How to notify specific thread??
From: bunallo (nmnm_at_alala.com)
Date: 02/25/05
- Next message: klynn47_at_comcast.net: "Re: How to notify specific thread??"
- Previous message: klynn47_at_comcast.net: "Re: Can Set Up the Compiler in XP"
- Next in thread: klynn47_at_comcast.net: "Re: How to notify specific thread??"
- Reply: klynn47_at_comcast.net: "Re: How to notify specific thread??"
- Reply: Chris Smith: "Re: How to notify specific thread??"
- Reply: Paul van Rossem: "Re: How to notify specific thread??"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 25 Feb 2005 03:44:37 +0100
If I have x number of threads that is waiting and I only want to notify a
specific thread how do I do this?
The situation is that I have some threads that needs to wait until a
specific object is inserted into a Database (made as a hashtable). When that
object is inserted into the database only the thread that waited for this
specific object is supposed to be notified.
I have made a notifyAll () call and then a while loop that checks if there
is one of all the newly notified that inserted the object. Each time this
while loop is false the wait is invoked on the thread.
But I would like to be able to notify only the correct thread. Heard this
could be done by making each thread lock on a unique object, but I can't
seem to make any sense out of it.
Hope someone can give me some ideas!
- Next message: klynn47_at_comcast.net: "Re: How to notify specific thread??"
- Previous message: klynn47_at_comcast.net: "Re: Can Set Up the Compiler in XP"
- Next in thread: klynn47_at_comcast.net: "Re: How to notify specific thread??"
- Reply: klynn47_at_comcast.net: "Re: How to notify specific thread??"
- Reply: Chris Smith: "Re: How to notify specific thread??"
- Reply: Paul van Rossem: "Re: How to notify specific thread??"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|