-
Notifications
You must be signed in to change notification settings - Fork 7
semaphore semaphore
Alairion edited this page May 8, 2021
·
4 revisions
nes::semaphore::semaphore
(1) explicit semaphore(std::size_t initial_count = 0);
(2) semaphore(const semaphore&) = delete;
(3) semaphore(semaphore&& other) noexcept = delete;
- Constructs a new semaphore object with
initial_count
resources available. - Deleted copy-constructor.
- Deleted move-constructor.
Name | Description |
---|---|
initial_count |
The count of resources available right after construction. The default value is 0
|
- Explicit.
- May throw a
std::runtime_error
if the semaphore can not be created. - Deleted.
- Deleted.
- On Windows, the semaphore is created using
CreateSemaphoreW
On Posix systems, the semaphore is created usingsem_init