Em seg., 2 de out. de 2023 às 11:49, Klemens Morgenstern via Boost < boost@lists.boost.org> escreveu:
On Mon, Oct 2, 2023 at 10:43 PM Christian Mazakas via Boost
wrote: I'm not going to submit a review but I do think the name is almost a
misnomer.
The library is essentially just an Asio wrapper and isn't a genuine coroutine library.
What would be a genuine asynchronous coroutine library?
Can you explain to me what an asynchronous coroutine is? As far as I see, the context-switch always happens in well defined points/cooperatively (thus synchronously). Racket does have preemptive fibers which are interrupted asynchronously (much like Golang's goroutines), but coroutines are not fibers. The Lisp community already learned this lesson: The difference between a fibers facility and just coroutines is that with
fibers, you have a scheduler as well.
https://wingolog.org/archives/2018/05/16/lightweight-concurrency-in-lua We have some of the best experts in this domain in our own community, and a few of them spared the time just on this topic as well: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4024.pdf The least we should do is to at least take the time to listen. Communities such as Ruby do misnomer coroutines and fibers, but we shouldn't be learning from incorrect material. Just as much, there are plenty of communities for which coroutines are just a syntax sugar for promises, but then again: we shouldn't be learning from incorrect material. Coroutines are not syntax sugars for promise objects. Coroutines are a broader topic. The most popular implementation nowadays are promises objects, but beyond a function that resumes, all the other details that involve these promise objects have nothing to do with coroutines. So, again, could you teach me what an asynchronous coroutine is? This is really a topic that I spend a lot of time mastering. Any new thing that I might learn here would be appreciated. -- Vinícius dos Santos Oliveira https://vinipsmaker.github.io/