0
Answer

ProcessThread need kick to start working again - how to do that?

Ask a question

Hi all,

 

I am using the C# API from Taipan Realtime (www.stoploss.de) to recieve Stock Quotes in my C# program.

This API provides a DataStream Object, which can be filled with the respective Stock Symbol Numbers. If a new Price is settled on the Exchange, a so-called Bid-Event is triggered in my Code. This Bid Event provides me with the informations about the new Price for this Instrument and I can do some analyzing.

But sometimes, the DataStream stops triggering Events. Although new Prices would be available. In the Task Manager, the Process "TaiPanRT.exe" suddenly has 0 CPU Time. It somehow fell asleep - forever, it would not wake up until:

 If I activate the graphical User Interface of TaiPan (by simply clicking the Taipan Icon on my Desktop), the process suddenly comes alive again and continues triggering the Events.

So what are my posibillities? I could restart the GUI of Taipan every Time I notice that the process is sleeping. But this is not what I want, I want to do it in the Code. By the way, I already asked them at stoploss.de - no answer yet.

So I started playing with the System.Diagnostic.Process Objects (ProcessThread etc.), but nothing seems to work right for this kind of problem. I somehow want to "kick" the sleeping process to make it work and triggering the events again. Do you have some suggestions

- what can be the problem of this behavior

- and how to solve that?

I'm really looking  forward to your answers!

kr

Flotschie