archives

Handling multiple concurrent exceptions in C++ using futures

Matti Rintala, Handling multiple concurrent exceptions in C++ using futures.

Aside from describing the way exceptions are handled in KC++, a concurrent C++ sytem based on active objects, this nice paper provides a short and readable description of the main difficulties in combining exceptions and asynchronous calls.

The KC++ approach is library based, and the paper explains how KC++ matches itself to the C++ exception handling model.

The description of the Ada model, in section 7, may be a bit unclear. Specifically, a nuance that is easy to overlook is that exceptions raised within an accept statement (and not handled there) are propagated both in the calling and in the called tasks. The Ada83 Rationale explains this in more detail and gives examples of use.

From an historical perspective it is a bit amusing (and also quite sad) that the issues resulting from the interaction of concurrency and exceptions, that the Ada designers had to tackle in late '70s early 80s, still occupy the time of language desginers today.