Executor
Configuration of the thread pool for executing asynchronous tasks
The executor manages the thread pool used by FlectonePulse for running asynchronous tasks. Changing these settings can affect performance.
Setting
Pathconfig.yml → executor
executor:
min_pool_size: 8
max_pool_size: 8
allow_core_thread_timeout: false
work_queue: "LINKED_BLOCKING"
keep_alive:
duration: 60
time_unit: "SECONDS"
shutdown_timeout:
duration: 5
time_unit: "SECONDS"min_pool_size
Minimum number of threads in the pool
max_pool_size
Maximum number of threads in the pool. A value of -1 means no limit — as many threads as needed for current tasks will be created
allow_core_thread_timeout
Allows core threads to be removed after being idle longer than keep_alive. Without this setting, core threads are never removed.
work_queue
Type of work queue for tasks
| Type | Explanation |
|---|---|
SYNCHRONOUS | Tasks are executed immediately; if no threads are available, a new one is created up to the limit, otherwise tasks run synchronously |
LINKED_BLOCKING | Tasks are queued and wait for threads to become available |
keep_alive
Settings for how long idle threads that are doing nothing are kept alive
duration
Time value for keep alive
time_unit
Time unit for keep alive
shutdown_timeout
Settings for how long to wait for running tasks to complete during shutdown
duration
Time value for shutdown timeout
time_unit
Time unit for shutdown timeout
FlectonePulse