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

Comparing jsr166/src/test/loops/MultipleProducersSingleConsumerLoops.java (file contents):
Revision 1.13 by jsr166, Sat Dec 31 19:50:56 2016 UTC vs.
Revision 1.15 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 254 | Line 253 | public class MultipleProducersSingleCons
253      static final class LTQasSQ<T> extends LinkedTransferQueue<T> {
254          LTQasSQ() { super(); }
255          public void put(T x) {
256 <            try { super.transfer(x);
257 <            } catch (InterruptedException ex) { throw new Error(); }
256 >            try { super.transfer(x); }
257 >            catch (InterruptedException ex) { throw new Error(ex); }
258          }
259      }
260  
# Line 266 | Line 265 | public class MultipleProducersSingleCons
265              if ((++calls & 1) == 0)
266                  super.put(x);
267              else {
268 <                try { super.transfer(x);
269 <                } catch (InterruptedException ex) {
271 <                    throw new Error();
272 <                }
268 >                try { super.transfer(x); }
269 >                catch (InterruptedException ex) { throw new Error(ex); }
270              }
271          }
272      }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines