On Sat, 2003-09-27 at 15:06, Brandon Low wrote: > I agree with your patch, and you're right that since the creator thread > is the _only thing anywhere_ that calls create and destroy my changes > were unneeded.
Your confusion demonstrates the need to move that code into the body of the loop. Fine grained locking is hard to get right. > > You might want to make the wait in the tail of the loop 1000 (didn't see > that in your patch, sorry if I missed it, I'm not very good at reading > context diff, only udiff) I just typed CTRL-X v = into emacs to get the patch. I'll figure out how to make it use -u by default. The wait 1000 change was in. > > Go ahead and commit your version (with possibly 1000 ms wait). If you can believe it, there was another bug. I referred to available outside of synchronized(countLock)... Fixed it to use a snapshot of available before unlock. Also added some more comments (that's when I discovered the bug). Then I found another. Inserting the destroyThread function (which had a return statement) was tricky and I got it wrong the first time, and the second time... I'm running a node with the changed version now and will commit the changes later today. -- Ed Huff
signature.asc
Description: This is a digitally signed message part
_______________________________________________ Devl mailing list [EMAIL PROTECTED] http://dodo.freenetproject.org/cgi-bin/mailman/listinfo/devl