Quick spike to test multi-threaded locking perf in response to this article that someone sent me.
Spawns 1000 tasks that aquire a lock, sleep 10ms, and then release the lock.
This only tests the read lock of the ReaderWriterLockSlim.
Note: I am aware that the lock keyword compiles to basically the following.
bool lockTaken = false;
try
{
Monitor.Enter(obj, ref lockTaken);
action();
}
finally
{
if (lockTaken)
Monitor.Exit(obj);
}
