TibrvDispatcher::create()
Method
Declaration
TibrvStatuscreate
(
TibrvDispatchable* dispatchable,
tibrv_f64 idleTimeout = TIBRV_WAIT_FOREVER);
Purpose
Remarks
This method creates a C dispatcher thread and stores its handle in the C++ object.
A dispatcher thread repeatedly dispatches a queue or queue group.
Inside the thread, a loop calls TibrvDispatchable::timedDispatch(). If the timed dispatch call returns without dispatching an event (after waiting for idleTimeout
seconds), then the thread exits by calling TibrvDispatcher::destroy().
Parameter |
Description |
dispatchable |
The new thread dispatches this object, which can be either a queue or a queue group. |
idleTimeout |
When this time period (in seconds) elapses without dispatching an event, the thread exits. The special value The special value |
Stack Size
On UNIX platforms that use the POSIX thread package (pthread
), this call sets the stacksize
attribute of the dispatcher thread to the larger of two candidate values—either the default stack size of the operating system, or 64 kilobytes.
For programs that require a larger stack size, we recommend that you code a custom dispatcher thread.
See Also
TibrvDispatchable::timedDispatch()
DISPATCHER.THREAD_EXITED in
tibrvDispatcher in