Space Engineers
Public Member Functions | List of all members
ParallelTasks.SpinLock Struct Reference

A struct which implements a spin lock. More...

Public Member Functions

void Enter ()
 Enters the lock. The calling thread will spin wait until it gains ownership of the lock. More...
 
bool TryEnter ()
 Tries to enter the lock. More...
 
void Exit ()
 Exits the lock. This allows other threads to take ownership of the lock. More...
 

Detailed Description

A struct which implements a spin lock.

Definition at line 12 of file SpinLock.cs.

Member Function Documentation

void ParallelTasks.SpinLock.Enter ( )
inline

Enters the lock. The calling thread will spin wait until it gains ownership of the lock.

Definition at line 20 of file SpinLock.cs.

void ParallelTasks.SpinLock.Exit ( )
inline

Exits the lock. This allows other threads to take ownership of the lock.

Definition at line 63 of file SpinLock.cs.

bool ParallelTasks.SpinLock.TryEnter ( )
inline

Tries to enter the lock.

Returns
true if the lock was successfully taken; else false.

Definition at line 41 of file SpinLock.cs.


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