Asynchronous function call for C++

前端 未结 8 727
面向向阳花
面向向阳花 2021-02-09 17:38

I need a hint how to implement asynchronous function calls in C/C++ ( or names of frameworks/API calls for windows and/or linux )

The use case is following: A parent thr

8条回答
  •  伪装坚强ぢ
    2021-02-09 18:24

    Boost.Thread

    I believe this does the job well. Spin up the function call as a new thread and just don't bother joining it. It'll take care of that when it finishes anyway I believe.

    You could set it up so the child sends a signal to the parent when it finishes using Boost.Signals. This signal would be linked to the parent's callback function.

提交回复
热议问题