mf
Media Framework
|
Synchronization primitive representing event that a thread can wait for. More...
#include <event.h>
Public Member Functions | |
event () | |
event (const event &)=delete | |
event (event &&) | |
virtual | ~event () |
event & | operator= (const event &)=delete |
event & | operator= (event &&) |
virtual void | notify () |
virtual void | wait () |
Static Public Member Functions | |
static event * | wait_any_ (event **begin, event **end) |
template<typename It > | |
static event & | wait_any_list (It begin_it, It end_it) |
template<typename... Events> | |
static event & | wait_any (Events &&...events) |
Public Attributes | |
std::uintptr_t | handle_ |
OS-specific handle. More... | |
Friends | |
bool | operator== (const event &a, const event &b) |
bool | operator!= (const event &a, const event &b) |
Synchronization primitive representing event that a thread can wait for.
Call to wait() blocks until event has been notified from another thread via notify(). That is, until the event is received. wait_any() waits for multiple events, until any one has been notified. If multiple threads wait on the same event, one (undefined which) receives it. Event is received once after one or multiple calls to notify(). Next call to wait() blocks again, multiple notify() calls are not accumulated.
mf::event::event | ( | ) |
|
delete |
mf::event::event | ( | event && | ) |
|
virtual |
|
virtual |
Reimplemented in mf::sticky_event.
|
virtual |
Reimplemented in mf::sticky_event.
|
inlinestatic |
|
inlinestatic |
std::uintptr_t mf::event::handle_ |
OS-specific handle.