I thought the segmented stack was the key to having hundreds of thousands of userland threads. It seems pretty farfetched (though not impossible) that realloc'ing the entire thread stack when it gets too big.
You might have better use of your memory (caching, in memory databases) than wasting it for even a fraction of a million of routines that are just waiting for something to happen.
https://github.com/roboprog/buzzard/blob/master/test/src/mai...
It performed reasonably well in a demo doing a bunch of string concatenation, but I never followed up on it.
https://github.com/roboprog/mp_bench/blob/master/thd_frk.bzr...