
3 Nov
2008
3 Nov
'08
3:42 p.m.
Anthony Williams:
No, I'm not sure, but if some_future.wait() switches to a new fiber I am concerned that it won't, because the exception state is per-thread, not per-fiber.
On second thought, yes, it might be possible to construct an example that breaks. You need to switch to another fiber in a catch clause, which then needs to throw _and_ switch back to you in a catch clause. Another problematic case is switching to another fiber during stack unwinding. I'm not sure if this can happen in practice in a straightforward pool implementation that only yields on wait. A waits for B waits for A is a deadlock anyway. -- Peter Dimov http://www.pdplayer.com