title: How to verify that Pika is working asynchronously?
body: <p>A characteristic of an asynchronous behaviour is that it <em>doesn't wait</em> on the handling of the current request to be completed before attending to the next one.</p>
  <p>In my recent exploration with Pika + RabbitMQ, I wanted to verify the above by using the Pika <code>SelectConnection()</code> adapter. I have written the <a href="https://gist.github.com/kingsleypeh/2b90128dc6ec8d3b7002740512ff2367#file-pub-py" rel="nofollow noreferrer">publisher code (<em>pub.py</em>)</a> and the <a href="https://gist.github.com/kingsleypeh/2b90128dc6ec8d3b7002740512ff2367#file-cons-py" rel="nofollow noreferrer">consumer code (<em>cons.py</em>)</a> for the experiment.</p>
  <p>I planned to run <em>pub.py</em> and <em>cons.py</em> once seperately in shell terminal, where the publisher will send arbitrary messages in quick succession and see it being received live by the consumer. In order to see the asynchronous behaviour in effect, the consumer will fake a long process (10 secs delay using <code>time.sleep(10)</code>) whenever it received a message suffixed with &quot;-10s&quot;.</p>
  <p>I was expecting the consumer to display subsequent messages that were sent while the consumer is still working on a &quot;-10s&quot; message. However, this was not the case.</p>
  <p>What I saw was the consumer pausing on the &quot;-10s&quot; message and only display the subsequent messages ALL AT ONCE after the <em>work</em> on the &quot;-10s&quot; message is completed. This suggests a <strong>synchronous</strong> behaviour.</p>
  <p>Is there something wrong either with my understanding or the test codes I have written? I think I can really use some advise here.</p>