8 |
|
import java.util.concurrent.locks.*; |
9 |
|
|
10 |
|
/** |
11 |
< |
* An <tt>Exchanger</tt> provides a synchronization point at which two threads |
12 |
< |
* can exchange objects. Each thread presents some object on entry to |
13 |
< |
* the {@link #exchange exchange} method, and receives the object presented by |
14 |
< |
* the other thread on return. |
11 |
> |
* A synchronization point at which two threads can exchange objects. |
12 |
> |
* Each thread presents some object on entry to the {@link #exchange |
13 |
> |
* exchange} method, and receives the object presented by the other |
14 |
> |
* thread on return. |
15 |
|
* |
16 |
|
* <p><b>Sample Usage:</b> |
17 |
|
* Here are the highlights of a class that uses an <tt>Exchanger</tt> to |