Original Post
The MSVC example of using exception_ptr/rethrow_exception()/current_exception() shows only how to send exception data to another thread, but the user has to explicitly call rethrow_exception(), and so the exception is not rethrown automatically. I need a method to overcome this, so that as soon as I save an exception in a thread, the exception would be immediately rethrown in the handler thread. I assume this would involve using signals and signal handlers, but I'm not well familiar with these on neither Windows nor Linux. I'd like to try in Windows first. Any pointers as to the best way to do this? From what I've read about signal handlers, I'm not sure how to cause the exception to have the effect as if it were raised in a particular scope of the thread that does the handling...maybe longjmp?