On Fri, May 10, 2024 at 1:25 PM Arno Schoedl via Boost
For all its drawbacks, stackful coroutines are an incredibly important tool in the programming toolbox. They don't require changes to the language, the rules surrounding lifetime are dead simple to understand, and for a broad range of use-cases they are perfectly adequate. The underlying technology, which is the ability to save and restore the context, is perfectly understood and there is overwhelming field experience. In other words, stackful coroutines are a solved problem. There is little to no controversy surrounding them.
Absolutely agreed. The current coroutines have their place but that we effectively need to keep two copies of every generic algorithm around, one plain and one coroutinified, just in case somewhere deep inside the callstack a caller-supplied lambda wants to yield is very unsatisfactory.
Do you have a code example of that? I'm able to wrap stackful coroutines into std::coroutine_handle's, so I'd like to see if there's some UB-infused solution to your problem.
Arno
-- Dr. Arno Schödl CTO schoedl@think-cell.commailto:schoedl@think-cell.com | +49 30 6664731-0
We are looking for C++ Developers: https://www.think-cell.com/career/dev
think-cell Software GmbH (Web sitehttps://www.think-cell.com) Leipziger Str. 51, 10117 Berlin, Germany Main phone +49 30 6664731-0 | US toll-free +1 800 891 8091
Amtsgericht Berlin-Charlottenburg HRB 180042 Directors: Alexander von Fritsch, Christoph Hobo
Please refer to our privacy policyhttps://www.think-cell.com/privacy on how we protect your personal data.
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost