Home | History | Annotate | Download | only in io

Lines Matching defs:thread

40  * Test that interrupting a thread blocked on I/O causes that thread to throw
52 Thread.interrupted();
61 Thread.interrupted(); // clear interrupted bit
121 Thread thread = interruptMeLater();
127 confirmInterrupted(thread);
132 Thread thread = interruptMeLater();
138 confirmInterrupted(thread);
143 Thread thread = interruptMeLater();
149 confirmInterrupted(thread);
154 Thread thread = interruptMeLater();
162 confirmInterrupted(thread);
167 Thread thread = interruptMeLater();
175 confirmInterrupted(thread);
180 Thread thread = interruptMeLater();
189 confirmInterrupted(thread);
193 private Thread interruptMeLater() throws Exception {
194 final Thread toInterrupt = Thread.currentThread();
195 Thread thread = new Thread(new Runnable () {
198 Thread.sleep(1000);
204 thread.start();
205 return thread;
208 private static void confirmInterrupted(Thread thread) throws InterruptedException {
211 assertTrue(Thread.interrupted());
213 thread.join();