dcsimg
<P>How to find whether the object is <BR> locked or not </P>
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Elamathi_Sambandam
Posted On:   Wednesday, September 19, 2001 06:04 AM


Is it possible that i could find
whether the object is locked by
some thread.

If it is locked, i would like to give
some message to the user like "try
after some time"




Mathi

Re: <P>How to find whether the object is <BR> locked or not </p>

Posted By:   Alex_Chaffee  
Posted On:   Wednesday, September 26, 2001 11:53 PM

Re: <P>How to find whether the object is <BR> locked or not </P>

Posted By:   Kevin_Riff  
Posted On:   Friday, September 21, 2001 12:19 PM

I don't think it's possible using only the API methods in the JDK. However, I have seen several examples of higher-level locking mechanisms that often do provide this feature. These classes are usually called either "Mutex" or "Semaphore". (Apparently the difference is significant, but subtle.) Try an internet search on those terms and I bet you'll come up with something. You might also look for a good book on threading in Java.
About | Sitemap | Contact