VideoTools
|
An object that hooks into the event loop and calls back to the client code with a small unsigned integer payload. More...
#include <gfutureevent.h>
Public Types | |
typedef HWND | handle_type |
Public Member Functions | |
FutureEvent (FutureEventHandler &) | |
Constructor. | |
~FutureEvent () | |
Destructor. | |
handle_type | handle () const |
Returns a handle that can be passed between threads and used in send(). More... | |
Static Public Member Functions | |
static bool | send (handle_type handle, unsigned int payload) g__noexcept |
Pokes the event payload into the main event loop so that the callback is called once the stack is unwound. More... | |
Friends | |
class | FutureEventImp |
An object that hooks into the event loop and calls back to the client code with a small unsigned integer payload.
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 | ( | ) | const |
Returns a handle that can be passed between threads and used in send().
Definition at line 150 of file gfutureevent_unix.cpp.
|
static |
Pokes the event payload into the main event loop so that the callback is called once the stack is unwound.
Returns true on success.
Definition at line 145 of file gfutureevent_unix.cpp.