Critical-Dispatcher Configuration Settings#
The critical-dispatcher
is a dedicated actor dispatcher, utilized exclusively by the block candidate generator and NodeViewHolder
actors within the system. This dispatcher is integral to maintaining critical tasks which require isolation from other non-critical activities.
Dispatcher Type#
type = Dispatcher
Dispatcher
.
Executor#
executor = "thread-pool-executor"
executor
is the mechanism responsible for running tasks given to it by the dispatcher. Here, it is configured to use the "thread-pool-executor"
, which creates a pool of worker threads for executing tasks.
Thread-Pool-Executor#
fixed-pool-size#
fixed-pool-size = 2
thread-pool-executor
. It is set to a fixed size of 2 in this configuration.
Throughput#
throughput = 1
throughput
is the maximum number of messages to be processed per actor before the thread is made available to other actors. This setting helps control how long a thread can be occupied by an actor. In this case, it is set to 1.
Complete Configuration Code#
critical-dispatcher {
type = Dispatcher
executor = "thread-pool-executor"
thread-pool-executor {
fixed-pool-size = 2
}
throughput = 1
}
NodeViewHolder
actors are allocated dedicated threads, thereby promoting efficient execution.