Relative Content

Tag Archive for c++boostboost-asio

Boost Asio: What’s the difference between the executor passed to boost::asio::post and the an associated executor?

For methods like post, and dispatch there is one overload taking only a CompletionToken and another additionally taking an Executor. As far as I know, the overload without Executor works as if the overload with the Executor was called with the CompletionTokens associated executor. However, what is the effect of passing an Executor to post that is not the associated executor of the CompletionToken? What’s the role of each of the executors? What executor will the CompetionToken‘s handler be executed on?