Stopping the client thread

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • LOH
    Junior Member
    • Sep 2017
    • 1

    #1

    Stopping the client thread

    Hi,

    I am currently using the BetfairClient API and StreamingBetfairClient API, working from code that another person has developed. So far everything is working OK, until I exit the application. The "client" thread is running, but I cannot find a way to stop this thread as the "client" is inaccessible from these APIs. So how do I get access to this client to perform the following?

    Logout or Disconnect or even stop the thread.

    Thanks
  • only1jake
    Junior Member
    • Nov 2016
    • 29

    #2
    How do you know the thread is still running? Is it software developed for your PC? Unless the program is open and retrieving data from the API, wouldn't the thread stop communicating?

    Comment

    • Lopiner
      Junior Member
      • Feb 2009
      • 117

      #3
      LOH,
      It seems you are describing a proprietary application build for you or by you. The logic is specific to your code and not part of the API. I'm no expert on threads but in .net if a thread isn't with the property .IsBackground = True then is has to be closed explicitly by you code (it doesn't "die" when the code that launched it stops)

      As an example, you have your main form that deploys a thread when someone clicks a button named start. If the .IsBackground = True property isn't set then if you exit the main form you will see in the Windows Task Manager that the thread is sill running. if .IsBackground = True then when you exit the form the thread stops.
      fooledbyabet.com

      Comment

      Working...
      X