Skip to content

JordanZaerr/ReaderWriterLockSlimPerf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ReaderWriterLockSlimPerf

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.

Perf Chart

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);
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages