lundi 29 octobre 2018

C++ wait for a callback to complete within a callback

We have a code that registers a callback. So the flow that registers the callback has no knowledge of when the callback will be called.

Now the callback will called by another flow in a thread - hence the main flow that has registered the callback needs to wait for callback to complete.

I am having no idea to implement the same as I cannot modify anything in the other thread that will call the callback. How can I make my main thread to responds synchronously - after the callback is called by other thread?

Aucun commentaire:

Enregistrer un commentaire