img
. . . . .
This is one of our classes. It implements barriers.
Comment: You won't use these very often, but if you're implementing something like a
simulation, these might come in useful.
Barrier
public Barrier (int i)
This creates a barrier object with a count of i.
Reference:
Chapter 7.
barrierSet
public synchronized void barrierSet(int i)
This resets the barrier count to i.
Reference:
Chapter 7.
barrierWait
public synchronized void barrierWait() {
This causes the calling thread to block until count threads have called barrierWait().
Reference:
Chapter 7.
The Class Extensions.SingleBarrier
This is one of our classes. It implements barriers with a divided set of waiters and posters.
Comment: You won't use these very often, perhaps only for example programs.
SingleBarrier
public SingleBarrier (int i)
This creates a single-barrier object with a count of i.
Reference:
Chapter 7.
barrierSet
public synchronized void barrierSet(int i)
This resets the single barrier count to i.
Reference:
Chapter 7.
barrierWait
public synchronized void barrierWait() {
This causes the calling thread to block until barrierPost() has been called count times.
Search WWH :
Custom Search
Previous Page
Multithreaded Programming with JAVA - Topic Index
Next Page
Multithreaded Programming with JAVA - Bookmarks
Home