Re: [Quickfix-users] Peforming application-specific actions at creation of the initiator thread
Brought to you by:
orenmnero
From: <Igo...@ub...> - 2004-04-26 16:14:16
|
OK, just looked at that, but it still doesn't seem that simple, as in this case it seems I would have no way to terminate the thread that's calling block(). The block() method ends up SocketInitiator::onStart(), calling SocketConnector::block() in a loop that won't exit until the private flag Initiator::m_stop is set to true. The only way to do that is to call Initiator::stop(), but stop() won't do anything unless the thread is created by Initiator::start(), as it checks the private variable Initiator::m_threadid, set by Initiator::start(). Cheers, Igor ------- Oren Miller <or...@qu...> ------- Well, start() is really a convenience method. What you should do if you want more control over the thread is to spawn one yourself and call block() on the initiator instead. This will run the initiator entirely in one thread and give you control over code that is run at startup and wind down of that thread. |