C++ master/worker

前端 未结 6 2322
忘了有多久
忘了有多久 2021-02-10 01:54

I am looking for a cross-platform C++ master/worker library or work queue library. The general idea is that my application would create some sort of Task or Work objects, pass

6条回答
  •  长情又很酷
    2021-02-10 02:10

    See this post for creating threads using the boost library in C++:

    Simple example of threading in C++

    (it is a c++ thread even though the title says c)

    basically, create your own "master" object that takes a "runnable" object and starts it running in a new thread.

    Then you can create new classes that implement "runnable" and throw them over to your master runner any old time you want.

提交回复
热议问题