title: Are boost::signals slots called synchronously or asynchronously?
body: <p>Can anyone tell me are <code>boost::signals</code> slots called synchronously or asynchronously?</p>
  
  <p>For example I have this piece of code:</p>
  
  <pre><code>struct Hello
  {
    void operator()() const
    {
      std::cout &lt;&lt; "Hello ";
    }
  };
  
  struct World
  {
    void operator()() const
    {
      std::cout &lt;&lt; " world!" &lt;&lt; std::endl;
    }
  };
  
  boost::signal&lt;void ()&gt; sig;
  
  sig.connect(Hello());
  sig.connect(World());
  
  sig();
  
  cout &lt;&lt; "Foo";
  </code></pre>
  
  <p>How does the execution thread work? Does the execution wait for <code>Hello()</code> and <code>World()</code> to execute and just after that <code>"Foo"</code> is printed or does it call them asynchronously(printing "Foo" and calling <code>Hello()</code> and <code>World()</code> execute in an undefined order)?</p>