> > Well you can have both in the same program but I have never seen a > > cooperative scheduling system to produce parallelism. > > What I mean is that you can use stackful coroutines/fibers AND a > multithreading runtime to have parallelism.
Ah yes, that's what I was trying to say. Go's runtime uses cooperative scheduling and OS threads earlier. > > One thing that always seemed better about stackful coroutines vs async > > futures would be much fewer allocations. Every async call that has any > > state incurs allocation overhead. > > That's not a fundamental problem but more of an engineering problem. Rust > tried hard to have zero-cost futures with no allocation. But their futures > are incompatible with the completion-model of IO from io-uring and Windows > IOCP (IO Completion port) because: Thanks for the info! I haven't really looked into Rust's future design aside from how hard it (used to?) be to use it. It does make sense you could make a non-allocating futures, but challenging and limiting. The io-uring completion model incompatibility seems like an example. I'm going to have to re-read what you posted a couple of times after I drink some more coffee. ;)