mf
Media Framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Static Public Member Functions | Public Attributes | Friends | List of all members
mf::event Class Reference

Synchronization primitive representing event that a thread can wait for. More...

#include <event.h>

Inheritance diagram for mf::event:
mf::sticky_event

Public Member Functions

 event ()
 
 event (const event &)=delete
 
 event (event &&)
 
virtual ~event ()
 
eventoperator= (const event &)=delete
 
eventoperator= (event &&)
 
virtual void notify ()
 
virtual void wait ()
 

Static Public Member Functions

static eventwait_any_ (event **begin, event **end)
 
template<typename It >
static eventwait_any_list (It begin_it, It end_it)
 
template<typename... Events>
static eventwait_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)
 

Detailed Description

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.

Constructor & Destructor Documentation

mf::event::event ( )
mf::event::event ( const event )
delete
mf::event::event ( event &&  )
virtual mf::event::~event ( )
virtual

Member Function Documentation

virtual void mf::event::notify ( )
virtual

Reimplemented in mf::sticky_event.

event& mf::event::operator= ( const event )
delete
event& mf::event::operator= ( event &&  )
virtual void mf::event::wait ( )
virtual

Reimplemented in mf::sticky_event.

template<typename... Events>
static event& mf::event::wait_any ( Events &&...  events)
inlinestatic
static event* mf::event::wait_any_ ( event **  begin,
event **  end 
)
static
template<typename It >
static event& mf::event::wait_any_list ( It  begin_it,
It  end_it 
)
inlinestatic

Friends And Related Function Documentation

bool operator!= ( const event a,
const event b 
)
friend
bool operator== ( const event a,
const event b 
)
friend

Member Data Documentation

std::uintptr_t mf::event::handle_

OS-specific handle.


The documentation for this class was generated from the following file: