[c++-pthreads] thread-safety definition

Ted Baker baker at cs.fsu.edu
Thu Jan 8 21:53:10 UTC 2004


> [1] Ada exceptions are async, but that language explicitly denys some
> of the data availability guarantees that other languages make, which
> allows you to avoid the memory barriers.

Right.  Both in Ada 83 and Ada 95 there was a lot of time and
intelletual effort devoted to the rules regarding what one can
assume has been done/undone when an exception is raised.

We implemented asynchronous transfers of control in GNARL,
and they tested out OK to the extent the GNAT regression
tests and Ada validation tests exercise them.

On the other hand, knowing what goes on underneath (essentially an
longjmp, with unwinding, from a signal handler to the recovery
point) and how much difficulty we had making the implementation
work, I have cooled considerably on the idea of *using*
asynchronous exceptions (and, to a lesser extent, exceptions in
general). The opportunities for surpises are just too many.

--Ted




More information about the c++-pthreads mailing list