MOO-cows Mailing List Archive
[Prev][Next][Index][Thread]
Re: Mutual Exclusion
On Wed, 8 Nov 1995, Pieter-Bas IJdens wrote:
> >Basically, all you need to ensure is that you do not suspend between
> >reading the variable, and writing to the variable, and all is well :^)
> >
> >Regards,
> >
> >Ian.
>
> I don't think you're right here. I suppose there is some kind of scheduler in
> the moo-server, and it just can occur that the two verbs are being
> executed at the same time. So maybe at program level everything is ok, but at
> server level they might be scheduled wrong, so the problem won't disappear.
> The only way of making sure everything is ok is by implementing some kind of
> ``semaphore'' or ``monitor'' in your moo-code (I think).
No. Only one task is executed at a time by the moo server. As long as
there is no suspend between read and write, then no other task will be
reading or writing the property between that read and write.
-D
References:
Home |
Subject Index |
Thread Index