Perhaps there is some confusion, but if in fact the call to axTws1_tickPrice or axTws1_tickSize do not happen on their own threads, then it is imperative that you return to the datafeed dispatcher as soon as possible.Quote from dsplaisted:
Why does it matter if it is blocking or nonblocking? Whether it blocks affects the caller, but does not directly affect your client program. It would matter if the TWS ActiveX control runs in the same thread as your main app. In that case your user interface would become unresponsive while you were processing an event from TWS. Is this what you see happening?
axTws1_tickPrice(object sender, AxTWSLib._DTwsEvents_tickPriceEvent e)
{
doSomeComplexCalculation();
}
HandleComplexCalc(Params p)
{
doSomeComplexCalculation();
}
axTws1_tickPrice(object sender, AxTWSLib._DTwsEvents_tickPriceEvent e)
{
ThreadPool.QueueUserWorkItem(this.HandleComplexCalc, params);
}