+ Collaboration diagram for System.Threading.SpinLock:

Public Member Functions

 SpinLock (bool enableThreadOwnerTracking)
 Initializes a new instance of the System.Threading.SpinLock struct. More...
 
void Enter (ref bool lockTaken)
 
void TryEnter (ref bool lockTaken)
 
void TryEnter (TimeSpan timeout, ref bool lockTaken)
 
void TryEnter (int millisecondsTimeout, ref bool lockTaken)
 
void Exit ()
 
void Exit (bool useMemoryBarrier)
 

Public Attributes

TicketType ticket
 
int threadWhoTookLock
 
readonly bool isThreadOwnerTrackingEnabled
 
ConcurrentOrderedList< int > stallTickets
 

Static Public Attributes

static readonly Watch sw = Watch.StartNew ()
 

Properties

bool IsThreadOwnerTrackingEnabled [get]
 
bool IsHeld [get]
 
bool IsHeldByCurrentThread [get]
 

Detailed Description

Definition at line 53 of file SpinLock.cs.

Constructor & Destructor Documentation

System.Threading.SpinLock.SpinLock ( bool  enableThreadOwnerTracking)

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

Parameters
enableThreadOwnerTrackingIf set to true enable thread owner tracking.

Important: Consumers on AOT must use this constructor to avoid JIT at runtime.

Definition at line 94 of file SpinLock.cs.

Member Function Documentation

void System.Threading.SpinLock.Enter ( ref bool  lockTaken)

Definition at line 118 of file SpinLock.cs.

void System.Threading.SpinLock.Exit ( )

Definition at line 196 of file SpinLock.cs.

void System.Threading.SpinLock.Exit ( bool  useMemoryBarrier)

Definition at line 202 of file SpinLock.cs.

void System.Threading.SpinLock.TryEnter ( ref bool  lockTaken)

Definition at line 151 of file SpinLock.cs.

void System.Threading.SpinLock.TryEnter ( TimeSpan  timeout,
ref bool  lockTaken 
)

Definition at line 156 of file SpinLock.cs.

void System.Threading.SpinLock.TryEnter ( int  millisecondsTimeout,
ref bool  lockTaken 
)

Definition at line 161 of file SpinLock.cs.

Member Data Documentation

readonly bool System.Threading.SpinLock.isThreadOwnerTrackingEnabled

Definition at line 58 of file SpinLock.cs.

ConcurrentOrderedList<int> System.Threading.SpinLock.stallTickets

Definition at line 62 of file SpinLock.cs.

readonly Watch System.Threading.SpinLock.sw = Watch.StartNew ()
static

Definition at line 60 of file SpinLock.cs.

int System.Threading.SpinLock.threadWhoTookLock

Definition at line 57 of file SpinLock.cs.

TicketType System.Threading.SpinLock.ticket

Definition at line 55 of file SpinLock.cs.

Property Documentation

bool System.Threading.SpinLock.IsHeld
get

Definition at line 70 of file SpinLock.cs.

bool System.Threading.SpinLock.IsHeldByCurrentThread
get

Definition at line 78 of file SpinLock.cs.

bool System.Threading.SpinLock.IsThreadOwnerTrackingEnabled
get

Definition at line 64 of file SpinLock.cs.


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