A class for sending event-data to a thread. More...
#include <eventq.h>

Public Member Functions | |
| eventq (void) | |
| int | count (void) |
| void | send (const value &v) |
| void | send (const statstring &tp, const value &dt) |
| void | send (const statstring &tp) |
| void | send (const char *tp) |
| value * | nextevent (void) |
| value * | waitevent (int timeout_msec) |
| value * | waitevent (void) |
Protected Attributes | |
| lock< value > | ipc |
| conditional | event |
A class for sending event-data to a thread.
It implements a fifo-queue of value objects. The receiving thread can either poll or sleep on incoming events.
| value * eventq::nextevent | ( | void | ) |
Get the next event, if there is any.
Will return an empty value-object if no events are waiting.
References ipc.
Referenced by thread::nextevent().
| void eventq::send | ( | const char * | tp | ) | [inline] |
| void eventq::send | ( | const statstring & | tp | ) |
Send an empty event with only a type.
Will be received as a boolean 'true' and the tprovided type().
| tp | The type() of the event. |
References ipc.
| void eventq::send | ( | const statstring & | tp, | |
| const value & | dt | |||
| ) |
Send an event with a specified type.
| tp | The type() of the event. | |
| dt | The event-data. |
References ipc.
| void eventq::send | ( | const value & | v | ) |
Send an event.
Will be received with a type() of "event".
| v | The event-data. |
References ipc.
Referenced by thread::sendevent(), and daemon::sendevent().
| value * eventq::waitevent | ( | int | timeout_msec | ) |
Wait for a new event with a timeout.
Will return an empty value-object if the timeout was reached.
| timeout_msec | The timeout in milliseconds. |
References event, ipc, conditional::wait(), and waitevent().
Referenced by thread::waitevent(), and daemon::waitevent().

1.6.1