C# Class System.Threading.SpinLock

显示文件 Open project: spicypixel/concurrency-kit-cs Class Usage Examples

Public Methods

Method Description
SpinLock ( bool enableThreadOwnerTracking ) : System

Initializes a new instance of the System.Threading.SpinLock struct.

TryEnter ( TimeSpan timeout, bool &lockTaken ) : void
TryEnter ( bool &lockTaken ) : void
TryEnter ( int millisecondsTimeout, bool &lockTaken ) : void

Private Methods

Method Description
Enter ( bool &lockTaken ) : void
Exit ( ) : void
Exit ( bool useMemoryBarrier ) : void

Method Details

SpinLock() public method

Initializes a new instance of the System.Threading.SpinLock struct.
public SpinLock ( bool enableThreadOwnerTracking ) : System
enableThreadOwnerTracking bool If set to true enable thread owner tracking.
return System

TryEnter() public method

public TryEnter ( TimeSpan timeout, bool &lockTaken ) : void
timeout TimeSpan
lockTaken bool
return void

TryEnter() public method

public TryEnter ( bool &lockTaken ) : void
lockTaken bool
return void

TryEnter() public method

public TryEnter ( int millisecondsTimeout, bool &lockTaken ) : void
millisecondsTimeout int
lockTaken bool
return void