Mastering C# Concurrency by Eugene Agafonov & Andrew Koryavchenko

Mastering C# Concurrency by Eugene Agafonov & Andrew Koryavchenko

Author:Eugene Agafonov & Andrew Koryavchenko [Agafonov, Eugene]
Language: eng
Format: azw3
Publisher: Packt Publishing
Published: 2015-10-28T04: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.