Tkrzw
|
Slotted broker to send a signal associated with a key to another thread. More...
#include <tkrzw_thread_util.h>
Classes | |
class | Waiter |
Handler to wait for the signal. More... | |
Public Member Functions | |
SlottedKeySignalBroker (int32_t num_slots) | |
Default constructor. More... | |
~SlottedKeySignalBroker () | |
Default constructor. More... | |
bool | Send (const KEYTYPE &key, bool all=true) |
Sends a signal identified by a key. More... | |
Friends | |
class | Waiter |
Slotted broker to send a signal associated with a key to another thread.
|
explicit |
Default constructor.
num_slots | The number of slots. |
tkrzw::SlottedKeySignalBroker< KEYTYPE >::~SlottedKeySignalBroker |
Default constructor.
num_slots | The number of slots. |
bool tkrzw::SlottedKeySignalBroker< KEYTYPE >::Send | ( | const KEYTYPE & | key, |
bool | all = true |
||
) |
Sends a signal identified by a key.
key | The key of the signal. |
all | If true, notification is sent to all waiting threads. If false, it is sent to only one waiting thread. |