Categories
October Surprise 2024

c++ – Boost asio io_service dispatch vs post – Stack Overflow

see this blog entry: To post or to dispatch? – This Thread Running the application we’ll see the difference between posting and dispatching. Since it could do it, dispatch () would execute fB () directly, so we’ll see it runs in the current thread, and synchronously. On the other side, post () would ask to io_service to do the job, asynchronously in another thread, and it immediately returns …