Hello! Thanks for your work in this area!
Andy Wingo <wi...@pobox.com> skribis: > I pushed an experimental branch recently, wip-ethreads. It implements > user-space cooperative threads that yield when they would otherwise > block or sleep. It seems to be useful for servers. Interestingly, user-level threads + port wrappers is the same strategy as GNU Pth. It has the advantage of avoiding IoC, while nicely solving some of the problems associated with native threads (state mutations are atomic, ‘fork’ can be used, etc.), but it has shortcomings. First, if user code ends up using a “raw” port, or does some other blocking call (even indirectly, via a library), the whole program is blocked. Second, if at some point you want to start using more than one core, you end up building an N×M thread library, which is a nightmare [0, 1]. [0] http://www.akkadia.org/drepper/glibcthreads.html [1] http://www.akkadia.org/drepper/nptl-design.pdf So, it seems cool to me, and it’s great that it addresses the web-server-that-forks use case. However, I fear that it’s not sufficiently generalizable. WDYT? Thanks, Ludo’.