[Quickfix-developers] Problem exiting onRun
Brought to you by:
orenmnero
From: David M. <dav...@ds...> - 2003-04-10 23:20:41
|
Hi All, I have got my java engine running very nicely. Basically I have a market data feed running on a thread and a scheduler running several threads. The data feed calls a onMarketDataEvent callback and the scheduler calls a onTimerEvent callback. These callbacks are implemented by my Application (along with all the QF callbacks). On the constructor of the Application object I instatiate and fire up both the market data source and the scheduler. The engine does its thing beautifully. After the specified time, the scheduler calls the onTimerEvenet callback which signals my engine (the Application) to stop. The callback sets quit = true which causes onRun to exit it's main loop. onRun nows closes the market data source (I see its threads disappear in the debugger) and it also closes the scheduler (threads also gone). I still see the Main thread, the onRun thread and another application thread which I don't know who created :-( Is this correct? Does QF create three threads? Does the SocketInitiator have a thread besides the onRun? There are several more System threads but these are owned by the JVM. Anyways, when onRun exits, I get a signal 11 (SIGSEV) and the jvm goes to lala land :-( The main thread (which created the Application and invoked the SocketInitiator.start() ) never exits (I have a println just before main() exits, which I never see). Has anyone seen this? Any ideas? Thanks David. PS Does QF support the creation of dynamic fix sessions? ie the way I see it today, all the sessions I use must be defined in both the Acceptor and the Initiator cfg files. What if I wanted to create a session to an Acceptor which "was not expecting" me (no entry for me as a TargetCompID in its cfg file). Cheers |