Eddie Garmon's Weblog

some architecture, some c#

Browse by Tags

All Tags » Synchronization » .NET (RSS)
Doh! Synced Actions and Funcs
After a little more use of the Synchronized<T>, I realized that over half the time I was 'returning true' just to satisfy Func<T, bool> when all that was really needed was an Action<T>. Read, ReadUpgradeableToWrite, and Write are all...
More on Syncronized - upgrade reader to writer
In using my new sync wrapper to clean up a bunch of older code, I came across the need to be able to upgrade from a reader to a writer for certain operations. One example of this it to clean up expired items in my my implementation of a Cache. protected...
Sync Enumerator update.
After a few more unit tests, I have fixed an issue with the GetSyncEnumerator method. The origional had 2 issues. was that the lock was being released too soon. was that a write in the middle of a long enumeration would cause a race and/or a deadlock...
Synchronization, ReaderWriterLockSlim, and Lambdas
Here is a synchronization wrapper that I wrote to wrap any object, and an implementation of a SynchronizedDictionary to show how to use it. I offer this code as-is without any waranty to fitness, to the public domain, for any purpose you see fit. Get...
More Posts