suspendable/resumable/prioritizable task dispatcher

chris-boostusers--- via Boost-users <[email protected]>
Newsgroups gmane.comp.lib.boost.user
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.