Boost logo

Boost Users :

From: chris-boostusers_at_[hidden]
Date: 2022-08-28 13:58:17


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!


PS: I was recently blown away by the coroutine capability of ASIO:
Talking Async Ep1: Why C++20 is the Awesomest Language for Network

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at