This looks super interesting! I've been working on a Raytracer in C++ and I was recently looking into a threading library which I can use to parallelize the rendering. Surely going to try this out in the coming weekend.<p>Unsolicited suggestion - while benchmarks and the motivation are important for a threading library, a code snippet of a simple parallel program on the home page would be something that I'd love to see.<p>Great job, though!
How would something like this differ from something like Sandia National Lab's Qthreads (<a href="http://www.cs.sandia.gov/qthreads/" rel="nofollow">http://www.cs.sandia.gov/qthreads/</a>)? Seems it's a tried and true solution in C that also works with C++11 (committed a test case for C++11 myself)...It is also an optional underpinning for some relatively big-name frameworks like Kokkos, Chapel, RaftLib, etc.
For what kinds of applications would one favor this over, say, the coroutines approach of libdill?<p><a href="http://libdill.org/tutorial.html" rel="nofollow">http://libdill.org/tutorial.html</a><p>See, in particular, Step 6 of the tutorial.
Interesting, I've recently been looking for a user level threading package in C/C++. I ended up settling on lthreads: <a href="http://lthread.readthedocs.io/en/latest/intro.html" rel="nofollow">http://lthread.readthedocs.io/en/latest/intro.html</a><p>Does anyone know how it compares?
How does it compare to boost.fiber (<a href="http://www.boost.org/doc/libs/1_62_0/libs/fiber/doc/html/index.html" rel="nofollow">http://www.boost.org/doc/libs/1_62_0/libs/fiber/doc/html/ind...</a>)?
Impressive.<p>8KiB stacks are a bit on the small side though for production usage. Go gets away with this because they're stacks act more like Vectors then flat arrays.<p>Why did you decided to roll your own stack swapping software instead of using say using `boost::context`?
I did something similar in plain C:<p><a href="https://github.com/ademakov/MainMemory" rel="nofollow">https://github.com/ademakov/MainMemory</a>