Java Threads mailing list archive

Re: Channels versus Methods

From: Richard Beton <rdb@roke.co.uk>
Date: Thu, 01 Jul 1999 09:38:37 +0100

Thomas Umland wrote:

>   public synchronized Object read (CallChannelFunctionInterface
>                                    function) {
>     if (data.getState () == ChannelDataStore.EMPTY) {

Is this the pathological wait/notify Pooh-trap? I think you might need
    while (data.getState () == ChannelDataStore.EMPTY) {

instead. (Someone will correct me if I'm wrong, no doubt)

Rick

	


Last updated: Tue Nov 2 12:11:41 1999
Maintained by Peter Welch.