[DGD] Paranoid about MP
Felix A. Croes
felix at dworkin.nl
Tue Aug 15 18:18:50 CEST 2006
Shentino <shentino at gmail.com> wrote:
> I did some reading about how MP was going to be implemented and ran
> across a concern.
>
> Do I need to be worried about reordering of threads?
Yes.
> More to the point:
>
> Barring speed differences, is it guaranteed that execution rounds in
> MP will execute in the same order as in UP? Or can threads commit in
> a different order than they started in?
>
> Examples:
>
> callout 1 (0 second) is scheduled
> callout 2 (0 second) is scheduled
>
> but if callout 2 is faster, it might commit before callout 1.
>
> Is this a concern or am I just being paranoid?
The best way to make absolutely sure that callout 1 commits before
callout 2, is to start callout 2 from callout 1.
Regards,
Dworkin
More information about the DGD
mailing list