From: Jeffrey R. Carter on
Adam Beneschan wrote:
>
> Hmmm... I haven't studied the dispatching rules enough to know how
> multiple processors affect things---that's why I assumed a single
> processor, for simplicity. If there are more than one, however, and
> if the body of PID will get assigned to run on a different processor
> than the main thread, then I'd think that makes things worse---you
> can't tell at all whether the SELECT or the ACCEPT will occur first,
> and there isn't any reason that it should work the same every time you
> run it.

Sure. They might happen at the same time.

That's the nature of concurrency. If you want things to happen in a specific
order, you need to make them all part of the same task.

--
Jeff Carter
"Now look, Col. Batguano, if that really is your name."
Dr. Strangelove
31