| Flags | Type | Name | Summary |
|---|---|---|---|
| public |
int
|
Value
(r)
|
Retrieve the current semaphore value. |
| Flags | Name | Summary |
|---|---|---|
| public |
Semaphore(int initialCount)
|
Create a Semaphore, with its counter initialized to the value passed in. |
| public |
Semaphore()
|
Create a Semaphore, with its counter initialized to 1. |
| Flags | Name | Summary |
|---|---|---|
| public |
void Release()
|
Release a single resource, incrementing the count by one. |
| public |
bool TryWait()
|
Acquire a single resource, decrementing the count by one and returning true, if a resource is available; otherwise, return false immediately. |
| public |
void Wait()
|
Acquire a single resource, decrementing the count by one. |
public
Semaphore(int initialCount)
| Parameters |
|
|---|
public
void Release()
| Flags | public |
|---|---|
| Return type |
void
|
public
bool TryWait()
| Flags | public |
|---|---|
| Return type |
bool
|
public
void Wait()
| Flags | public |
|---|---|
| Return type |
void
|