A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
The Java EE 7 Tutorial Volume 1 or Volume 2
this week in the
jQuery UI in Action
Java in General
Joined: Jun 11, 2007
Apr 28, 2011 02:53:11
How to get reduce of the find bug error saying. Manual thread scheduling with Thread.sleep() or Thread.yield() has no guaranteed semantics and is often used to mask race conditions.
I just use it for sleep the current thread for a while and its not used with in a condition statement. But its used inside a
case which has a assert statement at the end.
Stephan van Hulst
Joined: Sep 20, 2010
Apr 28, 2011 06:40:41
The warning is there to draw your attention to it. If you don't want it, switch it off in your IDE.
I agree. Here's the link:
subject: Thread.sleep() findbug
whethe the thread will release the lock?
question about thread output from examlab practice test 1
Threads: sleep() !
Thread.interrupt not working properly
Doubt in K&B: Threads
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014