A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Murach's Java Servlets and JSP
this week in the
Calling methods on a waiting thread
Joined: Jul 14, 2005
Apr 06, 2006 17:23:00
IF a thread is waiting on an object, and some other threads call the thread's methods, do the method calls get queued up and invoked when the thread is notified?
SCJP 1.4<br />SCJD
author and iconoclast
Joined: Jul 08, 2003
Apr 06, 2006 18:28:00
methods. A method always runs on the Thread that calls it -- although sometimes, the calling thread has to wait for the privilege.
If a Thread is waiting on an object, that actually has no effect at all on any other threads that call any of that same object's methods.
[Jess in Action]
I agree. Here's the link:
subject: Calling methods on a waiting thread
Why Thread isn't being notified in this case
how to release the lock??
difference between wait() and sleep()
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014