From 205abc22e97e1e8683ccf353a699107cd39ccf0e Mon Sep 17 00:00:00 2001 From: Oliver Kowalke Date: Fri, 8 Jul 2016 07:45:51 +0200 Subject: [PATCH] docu: add not to stack unwinding vor ecv2 --- doc/execution_context_v2.qbk | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/doc/execution_context_v2.qbk b/doc/execution_context_v2.qbk index 9f46aa6..a79c1d2 100644 --- a/doc/execution_context_v2.qbk +++ b/doc/execution_context_v2.qbk @@ -297,13 +297,18 @@ exception. In this example `f2()` is used to interrupt the `for`-loop in `f1()`. -[heading Stack destruction] +[heading stack unwinding] On construction of __econtext__ a stack is allocated. If the __context_fn__ returns the stack will be destructed. If the __context_fn__ has not yet returned and the destructor of an valid __econtext__ instance (e.g. ['execution_context::operator bool()] returns `true`) is called, the stack will be destructed too. +[important Code executed by __context_fn__ must not prevent the propagation of the +__forced_unwind__ exception. Absorbing that exception will cause stack +unwinding to fail. Thus, any code that catches all exceptions must re-throw any +pending __forced_unwind__ exception.] + [#ecv2_prealloc] [heading allocating control structures on top of stack]