Executors

Executors are providing the way an incoming message will be dispatched so that the message can be used for meaningful work. Different types of executors are supported, each with its own set of restrictions and capabilities.

Available Executors

blocking

A message executor which blocks the current thread.

The blocking executor’s start() method functions as a request processing loop - i.e. it blocks, processes messages and only returns when stop() is called from a dispatched method.

Method calls are dispatched in the current thread, so only a single method call can be executing at once. This executor is likely to only be useful for simple demo programs.

eventlet

A message executor which integrates with eventlet.

This is an executor which polls for incoming messages from a greenthread and dispatches each message in its own greenthread powered async executor.

The stop() method kills the message polling greenthread and the wait() method waits for all executor maintained greenthreads to complete.

threading

A message executor which integrates with threads.

A message process that polls for messages from a dispatching thread and on reception of an incoming message places the message to be processed in a thread pool to be executed at a later time.

Table Of Contents

Previous topic

Transport

Next topic

Target

This Page