Ark Server API (ASA) - Wiki
Loading...
Searching...
No Matches
FGenericPlatformProcess::FSemaphore Struct Referenceabstract

#include <GenericPlatformProcess.h>

+ Inheritance diagram for FGenericPlatformProcess::FSemaphore:

Public Member Functions

const TCHAR * GetName () const
 
virtual void Lock ()=0
 
virtual bool TryLock (uint64 NanosecondsToWait)=0
 
virtual void Unlock ()=0
 
 FSemaphore (const FString &InName)
 
 FSemaphore (const TCHAR *InName)
 
virtual ~FSemaphore ()
 

Protected Types

enum  Limits { MaxSemaphoreName = 128 }
 

Protected Attributes

TCHAR Name [MaxSemaphoreName]
 

Detailed Description

Generic representation of a interprocess semaphore

Definition at line 136 of file GenericPlatformProcess.h.

Member Enumeration Documentation

◆ Limits

enum FGenericPlatformProcess::FSemaphore::Limits
protected
Enumerator
MaxSemaphoreName 

Definition at line 177 of file GenericPlatformProcess.h.

Constructor & Destructor Documentation

◆ FSemaphore() [1/2]

FGenericPlatformProcess::FSemaphore::FSemaphore ( const FString & InName)

Creates and initializes a new instance with the specified name.

Parameters
InNamename 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.

Parameters
InNamename of the semaphore (all processes should use the same)

◆ ~FSemaphore()

virtual FGenericPlatformProcess::FSemaphore::~FSemaphore ( )
inlinevirtual

Virtual destructor.

Definition at line 173 of file GenericPlatformProcess.h.

Member Function Documentation

◆ GetName()

const TCHAR * FGenericPlatformProcess::FSemaphore::GetName ( ) const
inline

Returns the name of the object

Definition at line 139 of file GenericPlatformProcess.h.

◆ Lock()

virtual void FGenericPlatformProcess::FSemaphore::Lock ( )
pure virtual

Acquires an exclusive access (also known as Wait())

Implemented in FWindowsPlatformProcess::FWindowsSemaphore.

◆ 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()).

Parameters
Nanoseconds(10^-9 seconds) to wait for,
Returns
false if was not able to lock within given time

Implemented in FWindowsPlatformProcess::FWindowsSemaphore.

◆ Unlock()

virtual void FGenericPlatformProcess::FSemaphore::Unlock ( )
pure virtual

Relinquishes an exclusive access (also known as Release())

Implemented in FWindowsPlatformProcess::FWindowsSemaphore.

Member Data Documentation

◆ Name

TCHAR FGenericPlatformProcess::FSemaphore::Name[MaxSemaphoreName]
protected

Name of the region

Definition at line 183 of file GenericPlatformProcess.h.


The documentation for this struct was generated from the following file: