Utils.FailFastIfInterrupted Method
Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

Utils.FailFastIfInterrupted Method

.NET threads have not a method to check if they have been interrupted. Moreover, differently from java threads, when entering locked blocks, Monitor, Sleep, SpinWait and so on, a ThreadInterruptedException will be raised by the runtime.

Spring.Threading classes usually call this method before entering a lock block, to mirror java code

Usually this is non issue because the same exception will be raised entering the monitor associated with the lock ()

[Visual Basic]
Public Shared Sub FailFastIfInterrupted()
public static void FailFastIfInterrupted();


Exception TypeCondition
ThreadInterruptedExceptionif the thread has been interrupted

See Also

Utils Class | Spring.Threading Namespace |