title: Boost.Asio is the handler called after that the post?
body: <p>I need to post a lamda to an <code>io_context</code> but I want to have the guarantee that the handler is executed only after the <code>post()</code> call. Following a simplified snippet:</p>
  <pre><code>auto l = [] { cout &lt;&lt; &quot;hello lambda&quot;; };
  
  int f(asio::io_context&amp; io) {
    io.post(l);
  }
  
  int main() {
    asio::io_context io;
    thread th{[&amp;io] { io.run(); };
  
    f(io);
    cout &lt;&lt; &quot;hello main&quot;;
  
    th.join();
    return 0;
  }
  </code></pre>
  <p>Is it guarantee that &quot;hello main!&quot; is alayws called before &quot;hello lamda&quot;?</p>