<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); ">
<div style="font-family: Calibri, sans-serif; font-size: 14px; ">Hi, </div>
<div style="font-family: Calibri, sans-serif; font-size: 14px; "><br>
</div>
<div>
<div style="font-family: Calibri, sans-serif; font-size: 14px; ">Ioloops in async connection is exhibiting blocking semantics. I am trying to understand how this is different than a blocking connection</div>
<div style="font-family: Calibri, sans-serif; font-size: 14px; "><br>
</div>
<div>
<p style="font-family: Calibri, sans-serif; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; ">
The documentation (<span class="Apple-style-span" style="font-size: 14px; font-family: Calibri, sans-serif; "><a href="https://pika.readthedocs.org/en/latest/connecting.html#io-and-event-looping">https://pika.readthedocs.org/en/latest/connecting.html#io-and-event-looping</a> )
states:</span></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; ">
<span style="color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); display: inline !important; float: none; "><font class="Apple-style-span" face="Calibri" size="3">These
IOLoops are blocking methods which loop and listen for events.</font></span></p>
<p style="text-align: left; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; ">
<span class="Apple-style-span" style="line-height: 24px; "><font class="Apple-style-span" face="Calibri" size="3"><br>
</font></span></p>
<p style="text-align: left; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; ">
<span class="Apple-style-span" style="line-height: 24px; "><font class="Apple-style-span" face="Calibri" size="3">In a experiment I conducted, I publish 2 messages, each 5 times: message 'test' published by AsyncPublisher and 'test1' by AsyncPublisher1.py.
</font></span></p>
<p style="text-align: left; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; ">
<span class="Apple-style-span" style="line-height: 24px; "><font class="Apple-style-span" face="Calibri" size="3"><br>
</font></span></p>
<p style="text-align: left; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; ">
<span class="Apple-style-span" style="line-height: 24px; "><font class="Apple-style-span" face="Calibri" size="3">In the consumer I have an if block stating:</font></span></p>
<p style="text-align: left; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; ">
<span class="Apple-style-span" style="line-height: 24px; "><font class="Apple-style-span" face="Calibri" size="3">If body == test: </font></span></p>
<p style="text-align: left; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; ">
<span class="Apple-style-span" style="line-height: 24px; "><font class="Apple-style-span" face="Calibri" size="3"> Time.sleep(10)</font></span></p>
<p style="text-align: left; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; ">
<span class="Apple-style-span" style="line-height: 24px; "><font class="Apple-style-span" face="Calibri" size="3"><br>
</font></span></p>
<p style="text-align: left; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; ">
<span class="Apple-style-span" style="line-height: 24px; "><font class="Apple-style-span" face="Calibri" size="3">I run AsyncPublisher.py first, and after it has sent 5 test messages I run AsyncPublisher1.py.</font></span></p>
<p style="text-align: left; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; ">
<span class="Apple-style-span" style="line-height: 24px; "><font class="Apple-style-span" face="Calibri" size="3"><br>
</font></span></p>
<p style="text-align: left; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; ">
<span class="Apple-style-span" style="line-height: 24px; "><font class="Apple-style-span" face="Calibri" size="3">The output I expect is :</font></span></p>
<p style="text-align: left; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; ">
<span class="Apple-style-span" style="line-height: 24px; "><font class="Apple-style-span" face="Calibri" size="3">Test</font></span></p>
<p style="text-align: left; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; ">
<span class="Apple-style-span" style="line-height: 24px; background-color: rgb(255, 255, 0);"><font class="Apple-style-span" face="Calibri" size="3">test1</font></span></p>
<p style="text-align: left; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; ">
<span class="Apple-style-span" style="line-height: 24px; background-color: rgb(255, 255, 0);"><font class="Apple-style-span" face="Calibri" size="3">test1</font></span></p>
<p style="text-align: left; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; ">
<span class="Apple-style-span" style="line-height: 24px; background-color: rgb(255, 255, 0);"><font class="Apple-style-span" face="Calibri" size="3">test1</font></span></p>
<p style="text-align: left; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; ">
<span class="Apple-style-span" style="line-height: 24px; background-color: rgb(255, 255, 0);"><font class="Apple-style-span" face="Calibri" size="3">tes1</font></span></p>
<p style="text-align: left; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; ">
<span class="Apple-style-span" style="line-height: 24px; "><font class="Apple-style-span" face="Calibri" size="3">Test</font></span></p>
<p style="text-align: left; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; ">
<span class="Apple-style-span" style="line-height: 24px; "><font class="Apple-style-span" face="Calibri" size="3">Test</font></span></p>
<p style="text-align: left; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; ">
<span class="Apple-style-span" style="line-height: 24px; "><font class="Apple-style-span" face="Calibri" size="3">Test</font></span></p>
<p style="text-align: left; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; ">
<span class="Apple-style-span" style="line-height: 24px; "><font class="Apple-style-span" face="Calibri" size="3">Test</font></span></p>
<p style="text-align: left; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; ">
<span class="Apple-style-span" style="line-height: 24px; "><font class="Apple-style-span" face="Calibri" size="3"><br>
</font></span></p>
<p style="text-align: left; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; ">
<span class="Apple-style-span" style="line-height: 24px; "><font class="Apple-style-span" face="Calibri" size="3">Instead I get:</font></span></p>
<p style="text-align: left; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; ">
<span class="Apple-style-span" style="line-height: 24px; "><font class="Apple-style-span" face="Calibri" size="3">Test</font></span></p>
<p style="text-align: left; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; ">
<span class="Apple-style-span" style="line-height: 24px; "><font class="Apple-style-span" face="Calibri" size="3">Tes</font></span></p>
<p style="text-align: left; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; ">
<span class="Apple-style-span" style="line-height: 24px; "><font class="Apple-style-span" face="Calibri" size="3">Test</font></span></p>
<p style="text-align: left; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; ">
<span class="Apple-style-span" style="line-height: 24px; "><font class="Apple-style-span" face="Calibri" size="3">Test</font></span></p>
<p style="text-align: left; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; ">
<span class="Apple-style-span" style="line-height: 24px; "><font class="Apple-style-span" face="Calibri" size="3">Test</font></span></p>
<p style="text-align: left; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; ">
<span class="Apple-style-span" style="line-height: 24px; background-color: rgb(255, 255, 0);"><font class="Apple-style-span" face="Calibri" size="3">test1</font></span></p>
<p style="text-align: left; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; ">
<span class="Apple-style-span" style="line-height: 24px; background-color: rgb(255, 255, 0);"><font class="Apple-style-span" face="Calibri" size="3">test1</font></span></p>
<p style="text-align: left; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; ">
<span class="Apple-style-span" style="line-height: 24px; background-color: rgb(255, 255, 0);"><font class="Apple-style-span" face="Calibri" size="3">test1</font></span></p>
<p style="text-align: left; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; ">
<span class="Apple-style-span" style="line-height: 24px; background-color: rgb(255, 255, 0);"><font class="Apple-style-span" face="Calibri" size="3">test1</font></span></p>
<p style="text-align: left; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; ">
<span class="Apple-style-span" style="line-height: 24px; background-color: rgb(255, 255, 0);"><font class="Apple-style-span" face="Calibri" size="3">test1</font></span></p>
<p style="text-align: left; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; ">
<span class="Apple-style-span" style="line-height: 24px; "><font class="Apple-style-span" face="Calibri" size="3"><br>
</font></span></p>
<p style="text-align: left; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; ">
<span class="Apple-style-span" style="line-height: 24px; "><font class="Apple-style-span" face="Calibri" size="3">This is the same as if I would run the sender and receiver using a blocking connection.</font></span></p>
<p style="text-align: left; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; ">
<span class="Apple-style-span" style="line-height: 24px; "><font class="Apple-style-span" face="Calibri" size="3">My question is how does a blocking connection different than ioloop.start ? Does it differ only on multithreading ? </font></span></p>
<p style="text-align: left; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; ">
<span class="Apple-style-span" style="line-height: 24px; "><font class="Apple-style-span" face="Calibri" size="3"><br>
</font></span></p>
<p style="text-align: left; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; ">
<span class="Apple-style-span" style="line-height: 24px; "><font class="Apple-style-span" face="Calibri" size="3">Thanks,</font></span></p>
<p style="text-align: left; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; ">
<font class="Apple-style-span" face="Calibri" size="3"><span class="Apple-style-span" style="line-height: 24px; ">Ameya</span></font></p>
</div>
</div>
<div style="font-family: Calibri, sans-serif; font-size: 14px; "><font class="Apple-style-span" face="ff-meta-web-pro-1,ff-meta-web-pro-2,Arial,Helvetica Neue,sans-serif"><span class="Apple-style-span" style="font-size: 16px; line-height: 24px; "><br>
</span></font></div>
</body>
</html>