commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 12841] - GenericObjectPool unused variable and unused synchronized block
Date Wed, 30 Oct 2002 15:52:22 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12841>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12841

GenericObjectPool unused variable and unused synchronized block





------- Additional Comments From rwaldhof@us.britannica.com  2002-10-30 15:52 -------
> would using wait(sleeptime) be a 
> more desirable solution
> because of sleep not releasing 
> locks ?

I don't think so.  My understanding of the situation is that since the sleep() 
call in question is not within a synchronized block, there aren't any locks 
currently held.  Using wait() would force us to actually add syncrhonization 
around the mutex object.  I'm not sure I see any advantage to using Object.wait
() here instead of Thread.sleep(), but perhaps someone can clarify?

By the way, JGuru has a brief explination of sleep v. wait at 
http://www.jguru.com/faq/view.jsp?EID=47127, which points out that the 
currentThread() call in that line is redundant.

--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message