Announcement

Collapse
No announcement yet.

Threading issue?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Threading issue?

    I am using the Desktop API using the C# example from the forum as provided to me by Avery. When I try and debug it under Visual Studio 2010 I find the following odd behaviour.
    I make a request for historical data (or minute bars) and wait for the associated event (either onBarsReceived or OnBarChanged)
    In both cases I simply call a routine called processData(int lHandle) which uses the history handle that get_RequestHistory() had returned.
    Things were looking ok until my processData tried to write some information to the Text field of my Form or the to the listview item. When the debugger got to a line that would write to the Text field, it would jump to some other line as soon as I executed the line. For instance, if the debugger was at a line that read: item.SubItems[2].Text = bd.dOpen.ToString();
    where bd is some barData returned by Esignal, the debugger would jump somewhere else when executing that line.
    It is as if it caused an event that then made the code jump elsewhere.
    My question is: What is going on? Is this a threading issue? Is it that the ESignal activeX is on a separate thread?

  • #2
    This may or may not help you, but I am interfacing to the API through Ruby, and had to write something to make all calls to the API happen on the same thread it was created in.

    I think the COM interfaces themselves are not meant to be called from a different thread other than the one it was created in, but I could be wrong on this.

    Comment

    Working...
    X