Re: [Quickfix-developers] Threading issue
Brought to you by:
orenmnero
From: Oren M. <or...@qu...> - 2004-09-28 17:08:04
|
You do have to synchronize. But, if you inherit your application class from SynchronizedApplication, instead of directly from Application, then the synchronization will be done for you making those methods effectively thread safe. The limitation of course is that you can only process one message at a time, and you may be locking for longer then is optimal. But if you are just sticking them onto a queue, this is probably what you want. QuickFIX has no limitation on the number of messages it can handle, barring it doesn't run out of sequence numbers. Technically some versions of the spec say number should be reset at 99999, but I think this is probably a relic of lower volume days. So currently we allow sequence numbers to go up as high as possible. I don't know of any case where this has been a problem and don't know whether or not other engines have chosen to implement the 99999 rule. --oren On Sep 28, 2004, at 11:12 AM, Sharma Himanshu wrote: > QuickFIX Documentation: > http://www.quickfixengine.org/quickfix/doc/html/index.html > QuickFIX FAQ: > http://www.quickfixengine.org/wikifix/index.php?QuickFixFAQ > QuickFIX Support: http://www.quickfixengine.org/services.html > > Hi, > > I am using QuickFIX v1.8.0. The configuration file is defining more > that one session. The session's socket initiator class > ThreadedSocketInitiator. > > I have overloaded the fromApp(). Here I am trapping the messages > coming from counterparty engine and pushing into a queue. > > void myclass::fromApp(const Message & msg, const SessionID & session) > { > receive(msg); > } > > ... > > void receive(Message& msg) > { > //add to queue. > add_queue(msg); > } > > Question: > > 1. Is there any reason to assume this would cause any threading > issues? Is fromApp() thread-safe? > > 2. Is there any limitation in quickfix that would limit the number of > messages it can handle? > > Thanks in advance, > Himanshu > > _________________________________________________________________ > Seized by wanderlust? http://www.msn.co.in/Travel/ Have the best > vacation ever. > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 > Project Admins to receive an Apple iPod Mini FREE for your judgement on > who ports your project to Linux PPC the best. Sponsored by IBM. > Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php > _______________________________________________ > Quickfix-developers mailing list > Qui...@li... > https://lists.sourceforge.net/lists/listinfo/quickfix-developers > |