Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Thread Sleep and GC Pauses

807580Nov 2 2009 — edited Nov 2 2009
If I have a thread that sleeps for 60 seconds, and in the middle of the sleep the GC pauses the app for 15 seconds (stop the world pause), will the thread wake up after 75 seconds or will it wake up on time. For this first example, assume the pause happened when the thread was already alseep for 30 seconds (i.e. the pause didn't start near the end of sleep time)..

Secondly, if the pause did happen at around 59 seconds into the sleep, is it true the thread will wake up around 15 seconds late?


Thanks.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 30 2009
Added on Nov 2 2009
11 comments
2,133 views