Space Engineers
Classes | Public Member Functions | Properties | List of all members
VRage.FastResourceLock Class Reference
Inheritance diagram for VRage.FastResourceLock:
VRage.IResourceLock

Classes

struct  Statistics
 

Public Member Functions

 FastResourceLock ()
 
void Dispose ()
 
void AcquireExclusive ()
 Acquires the lock in exclusive mode, blocking if necessary. More...
 
void AcquireShared ()
 Acquires the lock in shared mode, blocking if necessary. More...
 
void ConvertExclusiveToShared ()
 
Statistics GetStatistics ()
 
void ReleaseExclusive ()
 Releases the lock in exclusive mode. More...
 
void ReleaseShared ()
 Releases the lock in shared mode. More...
 
void SpinAcquireExclusive ()
 
void SpinAcquireShared ()
 
void SpinConvertSharedToExclusive ()
 
bool TryAcquireExclusive ()
 Attempts to acquire the lock in exclusive mode. More...
 
bool TryAcquireShared ()
 Attempts to acquire the lock in shared mode. More...
 
bool TryConvertSharedToExclusive ()
 

Properties

int ExclusiveWaiters [get]
 
bool Owned [get]
 
int SharedOwners [get]
 
int SharedWaiters [get]
 

Detailed Description

Definition at line 7 of file FastResourceLock.cs.

Constructor & Destructor Documentation

VRage.FastResourceLock.FastResourceLock ( )
inline

Definition at line 45 of file FastResourceLock.cs.

Member Function Documentation

void VRage.FastResourceLock.AcquireExclusive ( )
inline

Acquires the lock in exclusive mode, blocking if necessary.

Implements VRage.IResourceLock.

Definition at line 97 of file FastResourceLock.cs.

void VRage.FastResourceLock.AcquireShared ( )
inline

Acquires the lock in shared mode, blocking if necessary.

Implements VRage.IResourceLock.

Definition at line 150 of file FastResourceLock.cs.

void VRage.FastResourceLock.ConvertExclusiveToShared ( )
inline

Definition at line 210 of file FastResourceLock.cs.

void VRage.FastResourceLock.Dispose ( )
inline

Definition at line 70 of file FastResourceLock.cs.

Statistics VRage.FastResourceLock.GetStatistics ( )
inline

Definition at line 245 of file FastResourceLock.cs.

void VRage.FastResourceLock.ReleaseExclusive ( )
inline

Releases the lock in exclusive mode.

Implements VRage.IResourceLock.

Definition at line 250 of file FastResourceLock.cs.

void VRage.FastResourceLock.ReleaseShared ( )
inline

Releases the lock in shared mode.

Implements VRage.IResourceLock.

Definition at line 290 of file FastResourceLock.cs.

void VRage.FastResourceLock.SpinAcquireExclusive ( )
inline

Definition at line 335 of file FastResourceLock.cs.

void VRage.FastResourceLock.SpinAcquireShared ( )
inline

Definition at line 361 of file FastResourceLock.cs.

void VRage.FastResourceLock.SpinConvertSharedToExclusive ( )
inline

Two threads calling this at the same time can apparently deadlock waiting for shared readers to reach 1.

So this is basically useless because you can only use it if only if you can guarantee only one thread is calling it.

Definition at line 404 of file FastResourceLock.cs.

bool VRage.FastResourceLock.TryAcquireExclusive ( )
inline

Attempts to acquire the lock in exclusive mode.

Returns
Whether the lock was acquired.

Implements VRage.IResourceLock.

Definition at line 429 of file FastResourceLock.cs.

bool VRage.FastResourceLock.TryAcquireShared ( )
inline

Attempts to acquire the lock in shared mode.

Returns
Whether the lock was acquired.

Implements VRage.IResourceLock.

Definition at line 445 of file FastResourceLock.cs.

bool VRage.FastResourceLock.TryConvertSharedToExclusive ( )
inline

Definition at line 475 of file FastResourceLock.cs.

Property Documentation

int VRage.FastResourceLock.ExclusiveWaiters
get

Definition at line 77 of file FastResourceLock.cs.

bool VRage.FastResourceLock.Owned
get

Definition at line 82 of file FastResourceLock.cs.

int VRage.FastResourceLock.SharedOwners
get

Definition at line 87 of file FastResourceLock.cs.

int VRage.FastResourceLock.SharedWaiters
get

Definition at line 92 of file FastResourceLock.cs.


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