{{Quickfixn}} Cannot launch an initiator app

Mark Smith msmith at rpia.ca
Mon Mar 2 09:20:35 PST 2020


Great, I did put a bool in there to allow for an orderly shutdown, and will add that Sleep() now. Thanks a lot!

[cid:image001.jpg at 01D52CE5.58701110]

Mark Smith | Associate Portfolio Manager, Quantitative Developer
RP Investment Advisors LP
39 Hazelton Avenue
Toronto, ON M5R 2E3


p. (647) 776-2578 | c. (647) 622-5971 | e. msmith at rpia.ca<http://@rpia.ca> | w. www.rpia.ca<http://www.rpia.ca/>



From: Quickfixn <quickfixn-bounces at lists.quickfixn.com> On Behalf Of Mike Gatny
Sent: Monday, March 2, 2020 9:44 AM
To: Mailing list for QuickFIX/n <quickfixn at lists.quickfixn.com>
Subject: Re: {{Quickfixn}} Cannot launch an initiator app

Mark,

You'll want to at least put a sleep in that loop, e.g.:  Thread.Sleep(2000);

And you might use a bool in your while loop to allow for an orderly shutdown, instead of doing while(true).  But that's up to you, and depends on the rest of your app's architecture.

--
Mike Gatny
Connamara Systems


On Fri, Feb 28, 2020 at 12:53 PM Mark Smith <msmith at rpia.ca<mailto:msmith at rpia.ca>> wrote:
Ah okay, thank you so much! So if I just want to sit and listen to messages, I should just enter a

while (true)
{
}

loop that does nothing?

From: Quickfixn <quickfixn-bounces at lists.quickfixn.com<mailto:quickfixn-bounces at lists.quickfixn.com>> On Behalf Of Mike Gatny
Sent: Friday, February 28, 2020 10:28 AM
To: Mailing list for QuickFIX/n <quickfixn at lists.quickfixn.com<mailto:quickfixn at lists.quickfixn.com>>
Subject: Re: {{Quickfixn}} Cannot launch an initiator app

On Fri, Feb 28, 2020 at 8:56 AM Mark Smith <msmith at rpia.ca<mailto:msmith at rpia.ca>> wrote:
using (Initiator)
Initiator.Start();

The Initiator's Start() method does not block.  If you allow the main thread to continue outside of that using 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.

You could enter a while loop (like Examples/TradeClient/TradeClientApp.cs does), or block/wait on a condition, or both.

--
Mike Gatny
Connamara Systems


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.


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.
If you no longer wish to receive future updates from RP Investment Advisors, you may withdraw your consent by clicking on UNSUBSCRIBE<mailto:unsubscribe at rpia.ca?Subject=UNSUBSCRIBE> and then Send or by replying to this email with "UNSUBSCRIBE" in the subject line or body of the e-mail.
_______________________________________________
Quickfixn mailing list
Quickfixn at lists.quickfixn.com<mailto:Quickfixn at lists.quickfixn.com>
http://lists.quickfixn.com/listinfo.cgi/quickfixn-quickfixn.com

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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.quickfixn.com/pipermail/quickfixn-quickfixn.com/attachments/20200302/3bfc581c/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 4474 bytes
Desc: image001.jpg
URL: <http://lists.quickfixn.com/pipermail/quickfixn-quickfixn.com/attachments/20200302/3bfc581c/attachment-0002.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.png
Type: image/png
Size: 243 bytes
Desc: image002.png
URL: <http://lists.quickfixn.com/pipermail/quickfixn-quickfixn.com/attachments/20200302/3bfc581c/attachment-0002.png>


More information about the Quickfixn mailing list