Re: [Quickfix-developers] Faster logons
Brought to you by:
orenmnero
|
From: Oren M. <or...@qu...> - 2005-11-03 19:18:59
|
Yeah, we've been using this to pass messages around with our thread safe queue: http://cvs.sourceforge.net/viewcvs.py/quickfix/quickfix/src/C%2B%2B/Queue.h?view=markup This was being used to pass buffers between the two threads that belong to a ThreadedSocketConnection. With Caleb's latest contribution, we got rid of one of the threads and are no longer using it. Needless to say it's gotten a good production workout over the years. This request comes just in time for us to find another use for it :) --oren ----- Original Message ----- From: "Brian Erst" <azz...@ya...> To: <qui...@li...> Sent: Thursday, November 03, 2005 1:10 PM Subject: Re: [Quickfix-developers] Faster logons QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/html/index.html QuickFIX Support: http://www.quickfixengine.org/services.html Well, then, just ignore my last message. Sounds like a tweaked Event object will do the trick perfectly! - Brian Erst --- Oren Miller <or...@qu...> wrote: > We actually do have a cross platform Event object that should do the > trick with a little modification: > http://cvs.sourceforge.net/viewcvs.py/quickfix/quickfix/src/C%2B%2B/Eventh?rev=1.4&view=markup. > > It uses WaitForSingleObject and pthread_cond_timedwait. It is > hardcoded to wait for 100 milliseconds. If we just add a wait() > signature where we can pass in a value for the time, this class would > probably be perfect. > > --oren > ----- Original Message ----- > From: Dale Wilson > Cc: qui...@li... > Sent: Thursday, November 03, 2005 12:54 PM > Subject: Re: [Quickfix-developers] Faster logons > > > Brian Erst wrote: > <SNIP> > I would also suggest that the use of process_sleep is a bad idea - > whenever I need to code a sleep-type function, I use a mutex and a > WaitForSingleObject with the sleep time as the timeout. That way, I > can > interrupt the sleep (by triggering the mutex) if the reason for the > sleep has gone away (or so I don't have to wait 30 seconds to bring > my > application down if I'm sleeping). Makes things much more responsive. > An excellent idea with one very important drawback. > WaitForSingleObject with a timeout is a WIN32 concept. > It is possible, but not necessarily easy, to code an equivalent > functionality on a posix system using pthread_cond_timedwait. > If QuickFIX were going to use this technique someone would have to > beef up its cross-platform thread synchronization support. > > Dale > > > - Brian Erst > Thynk Software, Inc. > > > -- > > ----------------------------------------------------- > Dale Wilson, Senior Software Engineer > Object Computing, Inc. (OCI) > http://www.ociweb.com/ http://www.theaceorb.com/ > ---------------------------------------------------- ------------------------------------------------------- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php _______________________________________________ Quickfix-developers mailing list Qui...@li... https://lists.sourceforge.net/lists/listinfo/quickfix-developers |