[DGD] atomic functions
pete at ana.sk
pete at ana.sk
Wed Aug 1 14:18:18 CEST 2001
> atomic int do_something()
> {
> ...
> if (some_condition) {
> error("abort");
> }
> ...
> return 1;
> }
>
> int catch_something()
> {
> catch {
> return do_something();
> } : {
> return 0;
> }
> }
>
> Easily extended if you only want to do this for a certain type of errors.
>
> The reason for not allowing a return of arbitrary data out of an aborted
> atomic function is that it could refer to data (objects) that does not
> exist outside of the atomic context. This is not going to change.
This is how im doing it already, just thought there could be
something better...
_________________________________________________________________
List config page: http://list.imaginary.com/mailman/listinfo/dgd
More information about the DGD
mailing list