RE: [Quickfix-developers] Deadlock when call SocketInitiator.stop ()
Brought to you by:
orenmnero
From: Angel P. <ap...@es...> - 2005-03-01 15:39:10
|
Hi J=F6rg, In the function=20 void Initiator::stop()=20 { QF_STACK_PUSH(Initiator::stop)=20 SessionIDs connected =3D m_connected; SessionIDs::iterator i =3D connected.begin(); for ( ; i !=3D connected.end(); ++i ) Session::lookupSession(*i)->logout(); =20 onStop(); if( m_threadid ) thread_join( m_threadid );=20 m_threadid =3D 0; QF_STACK_POP } In the line "thread_join( m_threadid );" take place a WaitForSingleObject(thread). I have a function in my code call "Desconectar" this function is: 1 bool CConexionFix::Desconectar() 2 { 3 try 4 { 5 m_initiatorFix->stop(); 6 m_bDesconectando =3D false; 7 } 8 catch (FIX::ConfigError e) 9 { 10 CString strError; 11 strError.Format("Excepci=F3n FIX %s", e.what()); 12 CTrazas::EscribirExcepcion(strError); 13 return false; 14 } 15 return true; 16} Only when the socket is received data the line 5 produce a deadlock. = This is easy of reproduce, for example when I'm receive all securities. Thank you Angel Pinto Lopez -----Mensaje original----- De: Joerg Thoennes [mailto:Joe...@ma...]=20 Enviado el: martes, 01 de marzo de 2005 15:46 Para: Angel Pinto CC: qui...@li... Asunto: Re: [Quickfix-developers] Deadlock when call = SocketInitiator.stop() Hi Angel, > When I call to function SocketInitiator.stop() and the = socket is > received data my application lock in this point. There have been some patches in CVS since 1.9.4 which deal with = stopping initiators. Perhaps you could try a CVS snapshot? > I'm using VC++6.0 under WXP with version 1.9.4 of QF. Could you provide more information, e.g. stack trace etc.? Cheers, J=F6rg --=20 Joerg Thoennes http://macd.com Tel.: +49 (0)241 44597-24 Macdonald Associates GmbH Fax : +49 (0)241 44597-10 Lothringer Str. 52, D-52070 Aachen |