#include <rex/platform/sync.h>
|
| static std::unique_ptr< Semaphore > | Create (int initial_count, int maximum_count) |
Semaphore object modeled on the Win32 semaphore.
◆ Create()
| std::unique_ptr< Semaphore > rex::platform::Semaphore::Create |
( |
int | initial_count, |
|
|
int | maximum_count ) |
|
static |
Creates a semaphore, signaled while its count is above 0.
- Parameters
-
| initial_count | Starting count, from 0 to maximum_count. |
- Returns
- The semaphore, or null on failure.
◆ Release()
| virtual bool rex::platform::Semaphore::Release |
( |
int | release_count, |
|
|
int * | out_previous_count ) |
|
pure virtual |
Raises the count.
- Parameters
-
| release_count | Amount to add, above 0. |
| out_previous_count | Receives the previous count, may be null. |
- Returns
- False when the count would pass maximum_count.
The documentation for this class was generated from the following file: