equal
deleted
inserted
replaced
20 * CA 95054 USA or visit www.sun.com if you need additional information or |
20 * CA 95054 USA or visit www.sun.com if you need additional information or |
21 * have any questions. |
21 * have any questions. |
22 */ |
22 */ |
23 |
23 |
24 /* @test |
24 /* @test |
25 * @bug 4607272 |
25 * @bug 4607272 6842687 |
26 * @summary Unit test for java.nio.channels.AsynchronousFileChannel |
26 * @summary Unit test for java.nio.channels.AsynchronousFileChannel |
27 * @build CustomThreadPool MyThreadFactory |
27 * @build CustomThreadPool MyThreadFactory |
28 * @run main/othervm -Djava.nio.channels.DefaultThreadPool.threadFactory=MyThreadFactory CustomThreadPool |
28 * @run main/othervm -Djava.nio.channels.DefaultThreadPool.threadFactory=MyThreadFactory CustomThreadPool |
29 */ |
29 */ |
30 |
30 |
49 public void completed(Integer result, AtomicReference<Thread> invoker) { |
49 public void completed(Integer result, AtomicReference<Thread> invoker) { |
50 invoker.set(Thread.currentThread()); |
50 invoker.set(Thread.currentThread()); |
51 } |
51 } |
52 public void failed(Throwable exc, AtomicReference<Thread> invoker) { |
52 public void failed(Throwable exc, AtomicReference<Thread> invoker) { |
53 } |
53 } |
54 public void cancelled(AtomicReference<Thread> invoker) { |
|
55 } |
|
56 }); |
54 }); |
57 Thread t; |
55 Thread t; |
58 while ((t = invoker.get()) == null) { |
56 while ((t = invoker.get()) == null) { |
59 Thread.sleep(100); |
57 Thread.sleep(100); |
60 } |
58 } |