{{Quickfixn}} Cannot launch an initiator app

Mike Gatny mgatny at connamara.com
Mon Mar 2 06:43:57 PST 2020


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> 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> *On Behalf Of *Mike
> Gatny
> *Sent:* Friday, February 28, 2020 10:28 AM
> *To:* Mailing list for QuickFIX/n <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> 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
> <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
> 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/f8569cc3/attachment.htm>


More information about the Quickfixn mailing list