Generic representation of a interprocess semaphore
更多...
#include <GenericPlatformProcess.h>
|
| | FSemaphore (const FString &InName) |
| | Creates and initializes a new instance with the specified name. 更多...
|
| |
| | FSemaphore (const TCHAR *InName) |
| | Creates and initializes a new instance with the specified name. 更多...
|
| |
|
const TCHAR * | GetName () const |
| | Returns the name of the object
|
| |
|
virtual void | Lock ()=0 |
| | Acquires an exclusive access (also known as Wait())
|
| |
| virtual bool | TryLock (uint64 NanosecondsToWait)=0 |
| | Tries to acquire and exclusive access for a specified amount of nanoseconds (also known as TryWait()). 更多...
|
| |
|
virtual void | Unlock ()=0 |
| | Relinquishes an exclusive access (also known as Release())
|
| |
|
virtual | ~FSemaphore () |
| | Virtual destructor.
|
| |
|
|
TCHAR | Name [MaxSemaphoreName] |
| | Name of the region
|
| |
Generic representation of a interprocess semaphore
◆ FSemaphore() [1/2]
| FGenericPlatformProcess::FSemaphore::FSemaphore |
( |
const FString & |
InName | ) |
|
Creates and initializes a new instance with the specified name.
- 参数
-
| InName | name of the semaphore (all processes should use the same) |
◆ FSemaphore() [2/2]
| FGenericPlatformProcess::FSemaphore::FSemaphore |
( |
const TCHAR * |
InName | ) |
|
Creates and initializes a new instance with the specified name.
- 参数
-
| InName | name of the semaphore (all processes should use the same) |
◆ TryLock()
| virtual bool FGenericPlatformProcess::FSemaphore::TryLock |
( |
uint64 |
NanosecondsToWait | ) |
|
|
pure virtual |
Tries to acquire and exclusive access for a specified amount of nanoseconds (also known as TryWait()).
- 参数
-
| Nanoseconds | (10^-9 seconds) to wait for, |
- 返回
- false if was not able to lock within given time
在 FWindowsPlatformProcess::FWindowsSemaphore 内被实现.
该结构体的文档由以下文件生成: