4 ms·
I just briefly skimmed the docs, so my observations may be inaccurate, but I got the impression that "stackful coroutines" are basically green threads (not C++2
by cmm 4y ago
I just briefly skimmed the docs, so my observations may be inaccurate, but I got the impression that "stackful coroutines" are basically green threads (not C++20 coroutines, as the name might hint). Green threads need a dedicated stack per thread, with all that implies, and also I don't find the cute "magical" implicit yielding helpful readability- and comprehension-wise, but that's more a matter of taste.
It is either telling or a glaring oversight (let's assume the latter) that there is no comparison with Seastar, which supports both C++20 coroutines and callbacks, with helpful syntax sugar for latter (coroutines are still nicer though!), has green threads too (which it calls "threads"), and can use io_uring, dpdk, etc. Seastar is free, actively developed, and is used by real software with demanding performance and scaling requirements, so in light of Seastar existing I'd expect any new C++ async framework to approach the task of "selling" itself more seriously than "it's like Go or Python but in C++!".
- MBkkt 4y agoSeastar is absolutely different approach, based on shared nothing architecture. It's not bad, but you cannot easy compare some async multi threaded architecture with it. Seastar it's something like multi process architecture, where every process doesn't have synchronization, except n spsc queue per process (used to communicate between cores) and have only cooperative multitasking So it good scales, if you don't have a lot of data to share, and have a very good work load balancer But commonly you haven't, so go-like approach more and more easy