Thread does not get notify

Hello,

I start 10 Threads.

If a thread must wait till recourse are valid then I call wait() method.

If any recourse are valid another synchronized method calls notify() method to wake up the thread.

I have the problem, that some the treads are in wait status and these will never wake up again!

This happens exactly, when I choose for example 10 Threads and 5 recourses, or 8 Threads and 4 resources, etc..

What could be the problem, that some threads do not get notify, even when I use netofyAll() method, the situation is the same!

[577 byte] By [sssakoa] at [2007-11-27 4:58:47]
# 1
Post your executable part of code. Otherwise no one knows what the problem is
AnanSmritia at 2007-7-12 10:14:48 > top of Java-index,Java Essentials,Java Programming...
# 2
Most likely problem is that you haven't used synchronized sections properly to manage the flags on which you're waiting.e.g. notify is being called before wait has done it's thing.
malcolmmca at 2007-7-12 10:14:48 > top of Java-index,Java Essentials,Java Programming...