How to not block on long requests?

  • Thread starter Thread starter Jeff
  • Start date Start date
J

Jeff

I have a worker thread that calls into a 3rd-party application that can
take a long time to respond to API calls. How can I make sure that my
worker thread promptly responds to stop requests from my main UI
thread? Should my worker thread spawn yet another thread for calls into
the 3rd-party app so that it can continue to monitor stop requests?
That sounds overly complicated to me. Are there any patterns you can
suggest?

Thanks,
Jeff
 
Hi Jeff,

Look at the System.ComponentModel.BackgroundWorker class. It should
respond your needs.

Fred
 
Back
Top