lipiec 2009

http://www.insomniacgames.com/tech/articles/0807/files/multithreading_optimization_basics.pdf

Rules for use:

  • Push() can only be called from one thread, but it doesn't need to be the same thread as Pop().
  • Pop() can only be called from one thread, but it doesn't need to be the same thread as Push().
  • max_count must be a power of two
  • Don't Pop() more than Count()
  • Check IsFull() or Count() before a Push()

Bardzo ciekawe klasy. Zwłaszcza iteratory. Iterator dający możliwość iteracji w sposób wątkoodporny brzmi ciekawie.
http://msdn.microsoft.com/en-us/library/system.collections.concurrent%28VS.100%29.aspx

I blog jednego z ludzi zajmujących się jak podejrzewam implementacją tych iteratorów.
http://blogs.msdn.com/pfxteam/archive/2008/08/12/8852005.aspx

Enumerating Concurrent Collections
http://www.infoq.com/news/2008/08/Parallel-Enumerators
Zwłaszcza to wylistowanie jest fajne:

  • Deleted items will always be seen
  • Deleted items will never be seen
  • Added items will always be seen if added at the end of the collection
  • Added items will always be seen if added wherever they are added
  • Added items will always never be seen
  • Moved items will never be seen twice
  • Moved items will be seen twice, if moved to the end of the collection
  • Moved items will always be seen, even if moved to the beginning of the collection
  • No more than N items will be seen, where N is the original length of the collection

     

 

Build a Richer Thread Synchronization Lock
http://msdn.microsoft.com/pl-pl/magazine/cc163642.aspx

Reader/Writer Locks and the ResourceLock Library
http://msdn.microsoft.com/en-us/magazine/cc163599.aspx

 

Naprawdę wyjątkowo dobrze napisany artykuł. Jeśli nawet nie masz czasu przeczytać go dziś to koniecznie zbookmarkuj na jakiś deszczowy dzień.

http://msdn.microsoft.com/en-us/magazine/cc163744.aspx