|
E-MailRelay
|
An object that hooks into the event loop and calls back to the client code. More...
#include <gfutureevent.h>
Public Types | |
| typedef HANDLE | handle_type |
Public Member Functions | |
| FutureEvent (FutureEventHandler &, ExceptionHandler &) | |
| Constructor. Installs itself in the event loop. | |
| ~FutureEvent () | |
| Destructor. | |
| handle_type | handle () |
| Returns a handle that can be passed between threads and used in send(). More... | |
Static Public Member Functions | |
| static bool | send (handle_type handle) g__noexcept |
| Pokes an event into the main event loop so that the FutureEventHandler callback is called asynchronously. More... | |
Friends | |
| class | FutureEventImp |
An object that hooks into the event loop and calls back to the client code.
The trigger function send() is typically called from a "future/promise" worker thread just before it finishes.
Eg:
Definition at line 62 of file gfutureevent.h.
| GNet::FutureEvent::handle_type GNet::FutureEvent::handle | ( | ) |
Returns a handle that can be passed between threads and used in send().
This should be called once.
Definition at line 151 of file gfutureevent_unix.cpp.
|
static |
Pokes an event into the main event loop so that the FutureEventHandler callback is called asynchronously.
Should be called exactly once if handle() has been called.
This is safe even if the FutureEvent object has been deleted. Returns true on success.
Definition at line 146 of file gfutureevent_unix.cpp.
1.8.9.1