ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/test/loops/ProducerConsumerLoops.java
(Generate patch)

Comparing jsr166/src/test/loops/ProducerConsumerLoops.java (file contents):
Revision 1.12 by jsr166, Sat Dec 31 19:50:57 2016 UTC vs.
Revision 1.14 by jsr166, Sat Dec 31 21:34:47 2016 UTC

# Line 4 | Line 4
4   * http://creativecommons.org/publicdomain/zero/1.0/
5   */
6  
7 import java.util.Random;
7   import java.util.concurrent.ArrayBlockingQueue;
8   import java.util.concurrent.BlockingQueue;
9   import java.util.concurrent.CyclicBarrier;
# Line 244 | Line 243 | public class ProducerConsumerLoops {
243      static final class LTQasSQ<T> extends LinkedTransferQueue<T> {
244          LTQasSQ() { super(); }
245          public void put(T x) {
246 <            try { super.transfer(x);
247 <            } catch (InterruptedException ex) { throw new Error(); }
246 >            try { super.transfer(x); }
247 >            catch (InterruptedException ex) { throw new Error(ex); }
248          }
249      }
250  
# Line 256 | Line 255 | public class ProducerConsumerLoops {
255              if ((++calls & 1) == 0)
256                  super.put(x);
257              else {
258 <                try { super.transfer(x);
259 <                } catch (InterruptedException ex) {
261 <                    throw new Error();
262 <                }
258 >                try { super.transfer(x); }
259 >                catch (InterruptedException ex) { throw new Error(ex); }
260              }
261          }
262      }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines