Mastering C# Concurrency by Agafonov Eugene & Koryavchenko Andrew

Mastering C# Concurrency by Agafonov Eugene & Koryavchenko Andrew

Author:Agafonov, Eugene & Koryavchenko, Andrew
Language: eng
Format: epub
Publisher: Packt Publishing
Published: 2015-10-27T16:00:00+00:00


Implementing a cache with ReaderWriterLockSlim

Caching is a common technique that is being used in many applications to increase performance and efficiency. Usually, reading from a cache occurs more often than writing operation, and the number of cache readers is higher that the number of writers.

In this particular case, there is no sense in using an exclusive lock preventing other threads from reading another cache value. There is a built-in synchronization object that has exactly this behavior, and it is called ReaderWriterLockSlim.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.