$darkmode
A portable semaphore object, optimally including a realtime-safe 'post' operation. More...
#include <synthclone/semaphore.h>
Public Member Functions | |
| Semaphore (QObject *parent=0) | |
| Constructs a new Semaphore object. More... | |
| ~Semaphore () | |
| Destroys a Semaphore object. More... | |
| void | post () |
| Increments the semaphore. More... | |
| void | wait () |
| Decrements the semaphore if the semaphore's value is greater than zero; otherwise, the thread will wait until another thread performs a 'post' operation on the semaphore. More... | |
A portable semaphore object, optimally including a realtime-safe 'post' operation.
|
explicit |
Constructs a new Semaphore object.
| parent | The parent object of the semaphore. |
| synthclone::Semaphore::~Semaphore | ( | ) |
Destroys a Semaphore object.
| void synthclone::Semaphore::post | ( | ) |
Increments the semaphore.
If there is one or more threads waiting on the semaphore, then a thread will be woken up.
| void synthclone::Semaphore::wait | ( | ) |
Decrements the semaphore if the semaphore's value is greater than zero; otherwise, the thread will wait until another thread performs a 'post' operation on the semaphore.