.NET Multi-threading with NG

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • JayBee
    Junior Member
    • Oct 2010
    • 114

    #1

    .NET Multi-threading with NG

    Has anyone done any multi-threading with API-NG?

    As you can imagine, making a listMarketBook call with many marketIds returns a lot of data which cannot be processed fast enough on a single-thread application.

    The problem is that a processing subroutine is on one thread and the GUI is on another. And that causes plenty of exceptions.

    What solutions have others found?
  • sb032345
    Junior Member
    • Dec 2013
    • 1

    #2
    Google '.invoke' or '.begininvoke', these are the methods for updating the GUI on the main thread..

    Comment

    • JayBee
      Junior Member
      • Oct 2010
      • 114

      #3
      I fiddled with that before. Not to my liking. I will stick to no threading and a UI for now, then when the bot is debugged I will get rid of the UI and use a background worker to post occasional reports.

      Originally posted by sb032345 View Post
      Google '.invoke' or '.begininvoke', these are the methods for updating the GUI on the main thread..

      Comment

      • Tipmanager1
        Junior Member
        • Sep 2013
        • 34

        #4
        have a look at the new ´async' and 'await' functionality in .NET 4.5, works perfect.

        Comment

        Working...
        X