While my honorable brethren are of course totally right, I'd also like to point out that for the sole purpose of getting the example to work according to your expectations you might take advantage of the line buffering behavior of standard output and just print your stuff in one line. Then turn off buffering/change output device and everything goes southwest again.
The moral is that if you want serial access to a shared resource - this is the general problem you are after - you either:
OR
OR
Cheers,
alf
In reply to Re: deterministic fork
by alien_life_form
in thread deterministic fork
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |