
Hi, this seems a very usefull piece of code. How does it behave under c++ exceptions? Exceptions must catched inside the function invoked by boost::context - if not sj/lj exception model is used (DWARF instead) -> see docu. With msvc, gcc/icc exceptions work (can be thrown and catched inside context).
What about windows 64 bit implementation, only 32 bit seems implemented ? unfortunately I've no 64bit Windows - at least I need a qcow2 image for qemu/kvm
On Windows I'd suggest to fall back to CreateFiber/SwitchToFiber/etc. These functions are not kernel calls, but merely do the context creation/switching. In my experience, it is almost impossible to convince the MSVC C++ runtime libraries to behave properly if you use your own context switching assembly code. OTOH, the measurements we performed shows SwitchToContext being to almost as fast as the hand written assembly code we were using in the beginning. Regards Hartmut --------------- Meet me at BoostCon www.boostcon.com