On Fri, Aug 09, 2002 at 08:24:58PM +0200, Goran Thyni wrote:
> On Fri, Aug 09, 2002 at 05:33:39PM +0200, Oskar Sandberg wrote:
> > If this wasn't jobbigt somebody would have done it already...
> 
> Not "?verdrivet jobbigt", I think.
> I've hacked together an implementation as a start.
> It supports one writer and several readers.

Good try, but there is no way you can use Thread.yield() like that - it
will cause even a single reading thread to make the node hit 100% CPU
usage just spinning there.

There is a _right way_ (tm) to this, and that is wait() and notify().

<>
-- 

Oskar Sandberg
oskar at freenetproject.org

_______________________________________________
devl mailing list
devl at freenetproject.org
http://hawk.freenetproject.org/cgi-bin/mailman/listinfo/devl

Reply via email to