Qpid Proton C++
0.17.0
|
Experimental - A serial execution context. More...
#include <event_loop.hpp>
Public Member Functions | |
event_loop () | |
Create event_loop. | |
operator bool () const | |
When using C++11 (or later) you can use event_loop in a bool context to indicate if there is an event loop set. More... | |
bool | operator! () const |
No event loop set. | |
bool | inject (void_function0 &f) |
Arrange to have f() called in the event_loop's sequence: possibly deferred, possibly in another thread. More... | |
bool | inject (std::function< void()> f) |
Arrange to have f() called in the event_loop's sequence: possibly deferred, possibly in another thread. More... | |
Experimental - A serial execution context.
Event handler functions associated with a single proton::connection are called in sequence. The connection's event_loop allows you to "inject" extra work from any thread, and have it executed in the same sequence.
bool inject | ( | void_function0 & | f | ) |
Arrange to have f() called in the event_loop's sequence: possibly deferred, possibly in another thread.
bool inject | ( | std::function< void()> | f | ) |
Arrange to have f() called in the event_loop's sequence: possibly deferred, possibly in another thread.
|
inlineexplicit |
When using C++11 (or later) you can use event_loop in a bool context to indicate if there is an event loop set.