Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Head First Android
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]
Don't get me started about those stupid
subject: Calling methods on a waiting thread
how to release the lock??
Why Thread isn't being notified in this case
difference between wait() and sleep()
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015