-
Bug
-
Resolution: Duplicate
-
P4
-
None
-
6
-
sparc
-
solaris_9
There is a race condition between sleep() and interrupt() (and possibly start()): if the timing is right, thread can enter TIMED_WAITING state and isInterrupted() will return true at the same time, which effectively renders assumption that any interrupts received before sleep() timeout will result in InterruptedException wrong.
interrupt() happens here but the thread can react only here
V V
ccccccccccccccccc1gggggggssssssssssssssssssssssssssssssssssssscc
calculations gap sleep
interrupt() happens here but the thread can react only here
V V
ccccccccccccccccc1gggggggssssssssssssssssssssssssssssssssssssscc
calculations gap sleep
- duplicates
-
JDK-6546236 Thread interrupt() of Thread.sleep() can be lost on Solaris due to race with signal handler
-
- Closed
-