<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
@font-face
{font-family:"Segoe UI";
panose-1:2 11 5 2 4 2 4 2 2 3;}
@font-face
{font-family:"Trebuchet MS";
panose-1:2 11 6 3 2 2 2 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
span.EmailStyle18
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1027" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">Great, I did put a bool in there to allow for an orderly shutdown, and will add that Sleep() now. Thanks a lot!<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" style="border-collapse:collapse">
<tbody>
<tr style="height:60.25pt">
<td width="266" valign="top" style="width:199.8pt;padding:0in 5.4pt 0in 5.4pt;height:60.25pt">
<p class="MsoNormal"><img width="252" height="65" style="width:2.625in;height:.677in" id="Picture_x0020_1" src="cid:image001.jpg@01D5F08C.F8F8F2D0" alt="cid:image001.jpg@01D52CE5.58701110"><b><span style="color:#1F497D"><o:p></o:p></span></b></p>
</td>
<td width="463" valign="top" style="width:346.9pt;padding:0in 0in 0in 0in;height:60.25pt">
<p class="MsoNormal"><b><span style="font-size:8.0pt;font-family:"Segoe UI",sans-serif;color:#3B3838">Mark Smith
</span></b><span style="font-size:8.0pt;font-family:"Segoe UI",sans-serif;color:#3B3838">|<b>
</b>Associate Portfolio Manager, Quantitative Developer<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-CA" style="font-size:8.0pt;font-family:"Segoe UI",sans-serif;color:#3B3838;mso-fareast-language:EN-CA">RP Investment Advisors LP<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-CA" style="font-size:8.0pt;font-family:"Segoe UI",sans-serif;color:#3B3838;mso-fareast-language:EN-CA">39 Hazelton Avenue<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-CA" style="font-size:8.0pt;font-family:"Segoe UI",sans-serif;color:#3B3838;mso-fareast-language:EN-CA">Toronto, ON M5R 2E3<o:p></o:p></span></p>
<p class="MsoNormal"><!--[if gte vml 1]><v:shapetype id="_x0000_t75" coordsize="21600,21600" o:spt="75" o:preferrelative="t" path="m@4@5l@4@11@9@11@9@5xe" filled="f" stroked="f">
<v:stroke joinstyle="miter" />
<v:formulas>
<v:f eqn="if lineDrawn pixelLineWidth 0" />
<v:f eqn="sum @0 1 0" />
<v:f eqn="sum 0 0 @1" />
<v:f eqn="prod @2 1 2" />
<v:f eqn="prod @3 21600 pixelWidth" />
<v:f eqn="prod @3 21600 pixelHeight" />
<v:f eqn="sum @0 0 1" />
<v:f eqn="prod @6 1 2" />
<v:f eqn="prod @7 21600 pixelWidth" />
<v:f eqn="sum @8 21600 0" />
<v:f eqn="prod @7 21600 pixelHeight" />
<v:f eqn="sum @10 21600 0" />
</v:formulas>
<v:path o:extrusionok="f" gradientshapeok="t" o:connecttype="rect" />
<o:lock v:ext="edit" aspectratio="t" />
</v:shapetype><v:shape id="Picture_x0020_3" o:spid="_x0000_s1026" type="#_x0000_t75" style='position:absolute;margin-left:-.75pt;margin-top:2.25pt;width:333.75pt;height:1.5pt;z-index:251659264;visibility:visible;mso-wrap-style:square;mso-width-percent:0;mso-height-percent:0;mso-wrap-distance-left:9pt;mso-wrap-distance-top:0;mso-wrap-distance-right:9pt;mso-wrap-distance-bottom:0;mso-position-horizontal:absolute;mso-position-horizontal-relative:text;mso-position-vertical:absolute;mso-position-vertical-relative:text;mso-width-percent:0;mso-height-percent:0;mso-width-relative:margin;mso-height-relative:margin'>
<v:imagedata src="cid:image002.png@01D5F08C.F8F8F2D0" o:title="" />
<o:lock v:ext="edit" aspectratio="f" />
</v:shape><![endif]--><![if !vml]><span style="mso-ignore:vglayout;position:relative;z-index:251659264;left:-1px;top:3px;width:445px;height:5px"><img width="445" height="2" style="width:4.6354in;height:.0208in" src="cid:image002.png@01D5F08C.F8F8F2D0" v:shapes="Picture_x0020_3"></span><![endif]><span lang="EN-CA" style="font-size:8.0pt;font-family:"Segoe UI",sans-serif;color:#002060;mso-fareast-language:EN-CA"><o:p> </o:p></span></p>
<br style="mso-ignore:vglayout" clear="ALL">
<p class="MsoNormal"><span lang="EN-CA" style="font-size:8.0pt;font-family:"Segoe UI",sans-serif;color:black;mso-fareast-language:EN-CA">p. (647) 776-2578 | c. (647) 622-5971 | e.</span><b><span lang="EN-CA" style="font-size:8.0pt;font-family:"Segoe UI",sans-serif;color:#2F5496;mso-fareast-language:EN-CA">
<u>msmith<a href="http://@rpia.ca"><span style="color:#2F5496">@rpia.ca</span></a></u>
</span></b><span lang="EN-CA" style="font-size:8.0pt;font-family:"Segoe UI",sans-serif;color:#3B3838;mso-fareast-language:EN-CA">| w.
</span><a href="http://www.rpia.ca/"><b><span lang="EN-CA" style="font-size:8.0pt;font-family:"Segoe UI",sans-serif;color:#2F5496;mso-fareast-language:EN-CA">www.rpia.ca</span></b></a><b><o:p></o:p></b></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><b>From:</b> Quickfixn <quickfixn-bounces@lists.quickfixn.com>
<b>On Behalf Of </b>Mike Gatny<br>
<b>Sent:</b> Monday, March 2, 2020 9:44 AM<br>
<b>To:</b> Mailing list for QuickFIX/n <quickfixn@lists.quickfixn.com><br>
<b>Subject:</b> Re: {{Quickfixn}} Cannot launch an initiator app<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">Mark,<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">You'll want to at least put a sleep in that loop, e.g.: <span style="font-family:"Courier New";color:black;background:#EEEEEE">Thread.Sleep(2000);</span> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">And you might use a bool in your while loop to allow for an orderly shutdown, instead of doing
<span style="font-family:"Courier New";color:black;background:#EEEEEE">while(true)</span>. But that's up to you, and depends on the rest of your app's architecture.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Arial",sans-serif">--</span><o:p></o:p></p>
</div>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal"><span style="font-family:"Arial",sans-serif">Mike Gatny</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Arial",sans-serif">Connamara Systems</span><o:p></o:p></p>
</div>
</div>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">On Fri, Feb 28, 2020 at 12:53 PM Mark Smith <<a href="mailto:msmith@rpia.ca">msmith@rpia.ca</a>> wrote:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Ah okay, thank you so much! So if I just want to sit and listen to messages, I should just enter a
<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">while (true)
<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">{<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">}
<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">loop that does nothing?<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><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<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">On Fri, Feb 28, 2020 at 8:56 AM Mark Smith <<a href="mailto:msmith@rpia.ca" target="_blank">msmith@rpia.ca</a>> wrote:<o:p></o:p></p>
</div>
<div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt">
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><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><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-indent:.5in">
<span style="font-size:9.5pt;font-family:Consolas;color:black">Initiator.Start();</span><o:p></o:p></p>
</div>
</div>
</blockquote>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">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.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">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.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-family:"Arial",sans-serif">--</span><o:p></o:p></p>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-family:"Arial",sans-serif">Mike Gatny</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-family:"Arial",sans-serif">Connamara Systems</span><o:p></o:p></p>
</div>
</div>
</div>
</div>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
</div>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><br>
<span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#1D1C1D;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><o:p></o:p></p>
</div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Trebuchet MS",sans-serif;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.</span>
<o:p></o:p></p>
</div>
<p class="MsoNormal">_______________________________________________<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" target="_blank">http://lists.quickfixn.com/listinfo.cgi/quickfixn-quickfixn.com</a><o:p></o:p></p>
</blockquote>
</div>
<p class="MsoNormal"><br>
<span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#1D1C1D;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><o:p></o:p></p>
</div>
</body>
</html>