[DGD]atomic functions
Felix A. Croes
felix at dworkin.nl
Sun Sep 26 00:32:39 CEST 1999
A function can be declared to be `atomic':
atomic void foo()
{
...
}
Atomic functions treat errors in a special way. If an error occurs,
every change made by this function is undone, including changes made
in functions called by this function.
At present, undoing socket output, add/remove callout and create/destruct
object are not yet implemented, but they will be in the future. Right
now, only changes to variables are undone in case of an error.
It will be illegal to use write_file(), save_object() or editor() from
atomically executed code. This is also not yet implemented.
Atomically executed code uses twice as many ticks as normal code.
The current code is probably unstable, but everyone is invited to try
it out and test it (and to mail me about the bugs!).
Regards,
Dworkin
List config page: http://list.imaginary.com/mailman/listinfo/dgd
More information about the DGD
mailing list