EDU.oswego.cs.dl.util.concurrent

Interface Rendezvous.RendezvousFunction

public interface Rendezvous.RendezvousFunction

Interface for functions run at rendezvous points
Method Summary
voidrendezvousFunction(Object[] objects)
Perform some function on the objects presented at a rendezvous.

Method Detail

rendezvousFunction

public void rendezvousFunction(Object[] objects)
Perform some function on the objects presented at a rendezvous. The objects array holds all presented items; one per thread. Its length is the number of parties. The array is ordered by arrival into the rendezvous. So, the last element (at objects[objects.length-1]) is guaranteed to have been presented by the thread performing this function. No identifying information is otherwise kept about which thread presented which item. If you need to trace origins, you will need to use an item type for rendezvous that includes identifying information. After return of this function, other threads are released, and each returns with the item with the same index as the one it presented.