pstore2
Public Member Functions | List of all members
pstore::signal_cv Class Reference

Public Member Functions

 signal_cv (signal_cv const &)=delete
 
 signal_cv (signal_cv &&)=delete
 
signal_cvoperator= (signal_cv const &)=delete
 
signal_cvoperator= (signal_cv &&)=delete
 
void notify_all (int const signal) noexcept
 Unblocks all threads currently waiting for *this. More...
 
void wait (std::unique_lock< std::mutex > &lock)
 Releases lock and blocks the current executing thread. More...
 
void wait ()
 
pipe_descriptor const & wait_descriptor () const noexcept
 
void reset ()
 
int signal () const
 

Member Function Documentation

◆ notify_all()

void pstore::signal_cv::notify_all ( int const  signal)
inlinenoexcept

Unblocks all threads currently waiting for *this.

Parameters
signalThe signal number responsible for the "wake".
Note
On POSIX, this function is called from a signal handler. It must only call signal-safe functions.

◆ wait()

void pstore::signal_cv::wait ( std::unique_lock< std::mutex > &  lock)
inline

Releases lock and blocks the current executing thread.

The thread will be unblocked when notify() is executed. When unblocked, lock is reacquired and wait exits.

Parameters
lockAn object of type std::unique_lock<std::mutex>, which must be locked by the current thread

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