Bruno Boettcher <[EMAIL PROTECTED]> writes:

> I noticed that for some reason the whole system come to a stop, whilst there
> where processes that are waiting after a yield. Those processes should be
> sleeping, but waked as soon as there are no other process, or am i
> wrong?

I understand that your program is huge and very difficult to trim down
to a one page program that still exhibits the behaviour you are
encountering, but if you could do that, it would be much more possible
to find out the cause.

Meanwhile, I worry more about the following:

> At
> the moment it doesn't behave this way and i had to put in a thread with a
> timer, which periodically calls a dummy method on all present objects to wake
> them :( this isn't as i thought it was supposed to work....

This is impossible.  If a thread T calls a method M, M is run in T, no
matter which object or class M belongs to.  Unless M is or leads to a
notify(), there is no way M wakes up any other thread.  Even when M
leads to a notify(), the waken thread will just resume what it has
been doing; M is still run by T, not the waken thread.

Thus, if by "dummy method" you really mean it, it cannot wake up any
thread, period.

What I think really happened is that your timer thread T is doing all
the work, giving you the impression that the program is making
progress, while all other threads are still blocked and not waken.


----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to