ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/main/java/util/concurrent/Exchanger.java
(Generate patch)

Comparing jsr166/src/main/java/util/concurrent/Exchanger.java (file contents):
Revision 1.84 by jsr166, Thu Nov 22 00:47:00 2018 UTC vs.
Revision 1.85 by dl, Fri Nov 27 17:41:59 2020 UTC

# Line 28 | Line 28 | import java.util.concurrent.locks.LockSu
28   * <pre> {@code
29   * class FillAndEmpty {
30   *   Exchanger<DataBuffer> exchanger = new Exchanger<>();
31 < *   DataBuffer initialEmptyBuffer = ... a made-up type
32 < *   DataBuffer initialFullBuffer = ...
31 > *   DataBuffer initialEmptyBuffer = ...; // a made-up type
32 > *   DataBuffer initialFullBuffer = ...;
33   *
34   *   class FillingLoop implements Runnable {
35   *     public void run() {
# Line 40 | Line 40 | import java.util.concurrent.locks.LockSu
40   *           if (currentBuffer.isFull())
41   *             currentBuffer = exchanger.exchange(currentBuffer);
42   *         }
43 < *       } catch (InterruptedException ex) { ... handle ... }
43 > *       } catch (InterruptedException ex) { ... handle ...}
44   *     }
45   *   }
46   *

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines