Inspirel banner

Programming Distributed Systems with YAMI4

4.3.14 Dispatcher Threads

Dispatcher threads are managed by the agent and used to deliver queued incoming messages to user-provided message handlers.

If the agent has only a single dispatcher thread, the processing of incoming messages is effectively serialized even if there are many incoming client connections. Many dispatcher threads can increase the processing throughput of the server agent (provided that there are system- or hardware-level opportunities to parallelize the processing), but at the same time the message handlers need to be prepared for multithreading invocations.

Property name: "dispatcher_threads".

Property type: integer.

Default value: 1.

Note:

The value for this option should not be negative. If it is zero, then no dispatcher thread is created and effectively the agent constructed this way cannot be used for receiving messages. Setting this option to 0 can be used to reduce the run-time footprint of agents that are used only for message sending.