Asynchronous function call for C++

前端 未结 8 717
面向向阳花
面向向阳花 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:25

    You'll have to set up some kind of infrastructure to notify the caller that the work is done. This could be done with an Observer pattern type. A message type infrastructure can be used as well.

    The real question is what is your parent going to do while it waits. Do you want it to poll for results? Or get notified?

提交回复
热议问题