Threadsafe Code

private static readonly Object _syncLock = new Object();

lock (_syncLock)
{
//atomic code block
}

Advertisements

%d bloggers like this: