Multithreaded Apps Made Easy Using Aspects - Part 2

added by gfraiteur
11/11/2010 6:03:33 AM


In Part 2, we made it easy to switch from one thread to another. That was the easy part! Now, how do we ensure threads don't compete when they need access the share resources? Horrified by the idea of directly using ReaderWriterLock in your code? Rightly so. This article shows you an easier way: apply [Reader], [Writer] and [Observer] custom attributes to the methods that need it.