[MUD-Dev] Atomic functions

Felix A. Croes felix at dworkin.nl
Wed Nov 15 03:01:09 CET 2000


KevinL <darius at bofh.net.au> wrote:

>[...]
> Can I ask, because I started to look at the code, but it looks to be a fun 
> thing to unravel, how it'd deal with the following (rather pathologic) bit of 
> code?
>
> if str < 10
>     str = str * 3
> else:
>     str = str * 2
>
> (using pythonic layout 'cause it's easier ;)
>
> Say this is part of a spell, to raise someone's strength (to give it that nice 
> muddy flavour).  It's cast by two people, A and B, on a third, C.  The 
> timeslicing does the following, for some strange reason:
>[remainder of example snipped]

Perhaps I am being dense -- but what does this have to do with atomic
functions, as I described them?

It is true that with threads running in parallel, a rollback in one
thread could have arbitrary results in another, which is why I
stipulated that threads must run sequentially (or at worst,
competitively in C&C fashion).

Regards,
Felix Croes



_______________________________________________
MUD-Dev mailing list
MUD-Dev at kanga.nu
https://www.kanga.nu/lists/listinfo/mud-dev



More information about the mud-dev-archive mailing list