Hi,

Unfortunately I don't have the vocabulary needed to ask this question, but hopefully I'll learn it here.

Does Boost have something that will help me with this problem:

I have a list of CPU-bound tasks I need to perform. I'll list two of them here:

   a) compute first zillion digits of pi (low priority)
   b) add two plus two (high priority)

I co_spawn (a). Later, while (a) is running, I co_spawn (b). (a) will be suspended at a "co_suspension_point" so that (b) can take over. Of course when (b) completes, (a) will resume.

For bonus points, it will support multiple threads (probably easy) and a task's priority can change over time (probably hard).

Thank you!

Chris

PS: I was recently blown away by the coroutine capability of ASIO: Talking Async Ep1: Why C++20 is the Awesomest Language for Network Programming https://www.youtube.com/watch?v=icgnqFM-aY4
_______________________________________________
Boost-users mailing list
Boost-users@lists.boost.org
https://lists.boost.org/mailman/listinfo.cgi/boost-users

Reply via email to