[DGD] Another mudlib requirement

Felix A. Croes felix at dworkin.nl
Sat Feb 14 00:33:27 CET 2004


I wrote:

>     - It must be possible to start a callout without making
>       a change to data in any object (this is why callouts
>       are no longer a resource in the kernel library, since
>       resources are tracked by a central object).

Suppose that several threads are starting callouts in the same object.
They don't modify the object, so these callouts are added, which is
fine.  However, some objects will have many callouts added to them
all the time.  That means that adding a new callout might not only
happen simultaneously with another thread doing the same thing, but
also with a thread started from a previous callout in that very
object.

The latter will probably modify the object, and if it commits before
any of the callout-adding threads, they will be cancelled because
they accessed a version of the object's state which is now out of
date.

There is a way around this: add a callout without accessing any data
in the object at all (neither read nor write access).  This includes
the object's variables as well as the callout table itself.  So, you
can add a callout to the object, but you can't access the variables,
or use status(obj) to get a listing of the existing callouts.

Therefore I'm broadening the requirement to:

    It must be possible to start a callout in an object without
    accessing any data in that object.

At present, the kernel library itself does not yet follow this rule.
This will be addressed in the next patch.

Regards,
Dworkin
_________________________________________________________________
List config page:  http://list.imaginary.com/mailman/listinfo/dgd



More information about the DGD mailing list