views:

150

answers:

4

Are there any generalisations of object and data and thread interactions given design pattern names?

Obviously what goes on a lot is synchronisation on an object, passing messages through a queue and also reference counts in memory management systems.

But are there any more OO-oriented names for multithreading design patterns and systems that cleanly embody best practice?

+1  A: 

This great article by Herb Sutter help you : Use Threads Correctly = Isolation + Asynchronous Messages

lsalamon
+3  A: 

"Pattern-oriented Software Architecture Vol 2: Patterns for Concurrent and Networked Objects" by Schmidt, Stal, Rohnert and Buschmann lists some. Douglas Schmidt is also the author of the ACE C++ framework which brings those patterns into practice.

Dimitri C.
So I note that that source (POSA2) gives us these primary design pattern names: Proactor, Reactor, Asynchronous Completion Token, Scoped Locking, Strategized Locking, Thread-Safe Interface, Double-Checked Locking Optimization, Thread-Specific Storage, Active Object, Monitor Object, Leader/Followers, Half-Sync/Half-Async and Thread-Specific Storage and also covers their interrelation both with each other and with other patterns.
martinr
+3  A: 

Producer - Consumer is one of those interaction design patterns for multi-threaded environments that deals with data-synchronization.

Peter Walser
+1  A: 

If you are thinking of beasts like Latch, Barrier or Semaphore take a look at the documentation for java.util.concurrent package (see here for example: http://java.sun.com/j2se/1.5.0/docs/api/java/util/concurrent/package-tree.html )

David Soroko