EventSource Class Reference
Sends Events to receivers in other threads.
More...
#include <cxxtools/eventsource.h>
List of all members.
|
Public Member Functions |
|
void | send (const cxxtools::Event &ev) |
|
void | connect (EventSink &sink) |
|
void | disconnect (EventSink &sink) |
|
template<typename EventT> |
| void | subscribe (EventSink &sink) |
|
template<typename EventT> |
| void | unsubscribe (EventSink &sink) |
Friends |
|
class | EventSink |
Detailed Description
The Signal class is not thread-safe and can only be used for intra-thread communication. To pass Events between different threads use an EventSource instead. Thread-safety only refers to the usage of the EventSource itself (connection, disconnecting...) and not the slot. Construction and destruction must always occur in isolation.