[DGD] atomic functions

pete at ana.sk pete at ana.sk
Tue Jul 31 17:12:03 CEST 2001


Hi ppl.

Just a question (and maybe suggestion). Is there a way how to 
cancel execution of atomic function (and return something from 
that finctions as result too) without making error? I have not found 
any...
And if im right and there is nothing for it, would not it be good to 
have something like that? Maybe "abort" statement, that will act as 
return from atomic function, only it will also rollback everything 
done? Something like

atomic int do_something() /* return 1 ok, 0 aborted */
{
	...
	if(some condition)
		abort 0;
	...
	return 1;
}

..
if(do_something())
{
	/* It worked! */
	...
}

Pete

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



More information about the DGD mailing list