|
Boost Users : |
From: chris-boostusers_at_[hidden]
Date: 2022-08-28 13:58:17
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 list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net