CQRS.NET  2.1
A lightweight enterprise framework to write CQRS, event-sourced and micro-service applications in hybrid multi-datacentre, on-premise and Azure environments.
Cqrs.Infrastructure.SpinWait Struct Reference

Provides support for spin-based waiting. More...

Classes

class  TimeoutHelper
 

Public Member Functions

void SpinOnce (short sleepInMilliseconds=0)
 Performs a single spin. More...
 
void Reset ()
 Resets the spin counter. More...
 

Static Public Member Functions

static void SpinUntil (Func< bool > condition, short sleepInMilliseconds=0)
 Spins until the specified condition is satisfied. More...
 
static bool SpinUntil (Func< bool > condition, TimeSpan timeout, short sleepInMilliseconds=0)
 Spins until the specified condition is satisfied or until the specified timeout is expired. More...
 
static bool SpinUntil (Func< bool > condition, int millisecondsTimeout, short sleepInMilliseconds=0)
 Spins until the specified condition is satisfied or until the specified timeout is expired. More...
 

Public Attributes

const short DefaultSleepInMilliseconds = 50
 A recommended sleep value of 50. More...
 

Properties

bool NextSpinWillYield [get]
 Gets whether the next call to M:System.Threading.SpinWait.SpinOnce will yield the processor, triggering a forced context switch. More...
 

Detailed Description

Provides support for spin-based waiting.