« Microsoft ECS talk. | Main | use v6-pugs; »



Feed You can follow this conversation by subscribing to the comment feed for this post.

While I was working on the Ruby port of the example script, I realized: shouldn't the two threads be joined to ensure that the "Thread N finished" messages get printed before the parent thread exits? Or do I misunderstand the Perl 6 threading model?

MenTaLguY: That is indeed a bug. I've updated the example to add the explicit joins as you did in the Ruby port. Thanks!

You're welcome. I was playing with my Ruby version again today, and noticed that sometimes it will print -1000 before both threads exit: there's a race in the gap between the sync { a++; } and the say $a;

Hmm, in retrospect the gap between sync { a++; } and say $a isn't necessarily a bug. It just produces behavior that differs from my naive expectations sometimes.

The comments to this entry are closed.