21#ifndef G_NET_FUTURE_EVENT_H
22#define G_NET_FUTURE_EVENT_H
31 class FutureEventHandler ;
32 class FutureEventImp ;
74 G_EXCEPTION( Error ,
"FutureEvent error" ) ;
75 using handle_type = HANDLE ;
83 handle_type
handle() noexcept ;
88 static
bool send( handle_type
handle ,
bool close = true ) noexcept ;
A tuple containing an ExceptionHandler interface pointer and a bound 'exception source' pointer.
A callback interface for GNet::FutureEvent.
virtual void onFutureEvent()=0
Callback function that delivers the future event.
virtual ~FutureEventHandler()=default
Destructor.
A pimple-pattern implementation class used by GNet::FutureEvent.
A FutureEvent object can be used to send a one-shot event via the event loop to the relevant event ha...
FutureEvent(FutureEventHandler &, ExceptionSink)
Constructor. Installs itself in the event loop.
handle_type handle() noexcept
Extracts a handle that can be passed between threads and used in send().
static bool send(handle_type handle, bool close=true) noexcept
Pokes an event into the main event loop so that the FutureEventHandler callback is called asynchronou...
~FutureEvent()
Destructor.