<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-size:small;color:rgb(0,0,0)">That's one approach.</div><div class="gmail_default" style="font-size:small;color:rgb(0,0,0)"><br></div><div class="gmail_default" style="font-size:small;color:rgb(0,0,0)">Another might be to block waiting for a key input, as demoed here:</div><div class="gmail_default" style="font-size:small;color:rgb(0,0,0)"><a href="https://github.com/connamara/quickfixn/blob/master/Examples/SimpleAcceptor/Program.cs">https://github.com/connamara/quickfixn/blob/master/Examples/SimpleAcceptor/Program.cs</a></div><div class="gmail_default" style="font-size:small;color:rgb(0,0,0)"><br></div><div class="gmail_default" style="font-size:small;color:rgb(0,0,0)">There's probably like 5 other ways to do something like this.  Whatever works for you.</div><div class="gmail_default" style="font-size:small;color:rgb(0,0,0)"></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Feb 28, 2020 at 11:53 AM Mark Smith <<a href="mailto:msmith@rpia.ca">msmith@rpia.ca</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">





<div lang="EN-US">
<div class="gmail-m_-8742672572635386097WordSection1">
<p class="MsoNormal">Ah okay, thank you so much! So if I just want to sit and listen to messages, I should just enter a
<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">while (true) <u></u><u></u></p>
<p class="MsoNormal">{<u></u><u></u></p>
<p class="MsoNormal">} <u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">loop that does nothing?<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><b>From:</b> Quickfixn <<a href="mailto:quickfixn-bounces@lists.quickfixn.com" target="_blank">quickfixn-bounces@lists.quickfixn.com</a>>
<b>On Behalf Of </b>Mike Gatny<br>
<b>Sent:</b> Friday, February 28, 2020 10:28 AM<br>
<b>To:</b> Mailing list for QuickFIX/n <<a href="mailto:quickfixn@lists.quickfixn.com" target="_blank">quickfixn@lists.quickfixn.com</a>><br>
<b>Subject:</b> Re: {{Quickfixn}} Cannot launch an initiator app<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal">On Fri, Feb 28, 2020 at 8:56 AM Mark Smith <<a href="mailto:msmith@rpia.ca" target="_blank">msmith@rpia.ca</a>> wrote:<u></u><u></u></p>
</div>
<div>
<blockquote style="border-top:none;border-right:none;border-bottom:none;border-left:1pt solid rgb(204,204,204);padding:0in 0in 0in 6pt;margin-left:4.8pt;margin-right:0in">
<div>
<div>
<p class="MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:blue">using</span><span style="font-size:9.5pt;font-family:Consolas;color:black"> (Initiator)</span><u></u><u></u></p>
<p class="MsoNormal" style="text-indent:0.5in">
<span style="font-size:9.5pt;font-family:Consolas;color:black">Initiator.Start();</span><u></u><u></u></p>
</div>
</div>
</blockquote>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">The Initiator's <b><span style="font-family:"Courier New"">Start()</span></b> method does not block.  If you allow the main thread to continue outside of that
<b><span style="font-family:"Courier New"">using</span></b> block, your Initiator is going to be disposed, which is going to attempt to dispose your log files, etc...  hence the error where the Initiator is trying to write to closed logs.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">You could enter a while loop (like <span style="font-family:"Courier New"">
Examples/TradeClient/TradeClientApp.cs </span>does), or block/wait on a condition, or both.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal"><span style="font-family:Arial,sans-serif">--</span><u></u><u></u></p>
</div>
<p class="MsoNormal"><span style="font-family:Arial,sans-serif">Mike Gatny</span><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:Arial,sans-serif">Connamara Systems</span><u></u><u></u></p>
</div>
</div>
</div>
</div>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
</div>
</div>
<p class="MsoNormal"><br>
<span style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(29,28,29);background:white">This email, along with any attachments, is confidential. If you believe you received this message in error, please contact the sender immediately and delete all copies
 of the message. Thank you from Connamara Systems, LLC.</span><u></u><u></u></p>
</div>
<font size="2" face="Trebuchet MS" color="gray"><br>
<br>
This message contains information that is privileged and confidential. Please notify the sender immediately if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free
 as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission.<br>
If you no longer wish to receive future updates from RP Investment Advisors, you may withdraw your consent by clicking on
<a href="mailto:unsubscribe@rpia.ca?Subject=UNSUBSCRIBE" target="_blank">UNSUBSCRIBE</a> and then Send or by replying to this email with "UNSUBSCRIBE" in the subject line or body of the e-mail.</font>
</div>

_______________________________________________<br>
Quickfixn mailing list<br>
<a href="mailto:Quickfixn@lists.quickfixn.com" target="_blank">Quickfixn@lists.quickfixn.com</a><br>
<a href="http://lists.quickfixn.com/listinfo.cgi/quickfixn-quickfixn.com" rel="noreferrer" target="_blank">http://lists.quickfixn.com/listinfo.cgi/quickfixn-quickfixn.com</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div><font size="2"><span style="background-color:rgb(0,0,0)"><span style="background-color:rgb(255,255,255)">Grant Birchmeier</span></span></font><font size="2"><font color="#3333ff"><br></font></font></div><div><font size="2"><b><font color="#3333ff"><span style="background-color:rgb(255,204,51)"><span style="background-color:rgb(255,204,102)"><span style="background-color:rgb(255,204,153)"><span style="background-color:rgb(255,255,255)"><span style="background-color:rgb(255,204,0)">Connamara Systems, LLC</span></span></span></span></span></font></b></font><br></div><div><font size="2"><b>Made-To-Measure Trading Solutions.</b></font></div><div><font size="2">Exactly what you need. No more. No less.</font><font size="2"><b><font color="#3333ff"><br></font></b></font></div><div><font size="2"><a href="http://connamara.com" target="_blank">http://connamara.com</a><br></font></div></div>

<br>
<span style="color:rgb(29,28,29);font-family:Slack-Lato,appleLogo,sans-serif;white-space:pre-wrap;background-color:white"><font size="2">This email, along with any attachments, is confidential. If you believe you received this message in error, please contact the sender immediately and delete all copies of the message. Thank you from Connamara Systems, LLC.</font></span>