Backgroundworker & Pausing

  • Thread starter Thread starter elziko
  • Start date Start date
E

elziko

Is there any way I can suspend a System.ComponentModel.BackgroundWorker to
enable me to provide pause functionality?

TIA
 
You could pause the thread but it rather make me think about a Windows
service. What are you trying to do exactly ?
 
Patrice said:
You could pause the thread but it rather make me think about a Windows
service. What are you trying to do exactly ?

I just have some code that takes a long time to finish and locks up the user
interface. The user has the rquirement to be able to cancel this code or
pause it.

You say I can pause the thread but I don't see how. The BackgroundWorker
class has a CancelAsync method but no "Suspend" method to match it. Also it
doesn't seem to give me anyway of getting a reference to the underlying
Thread that it creates so that I can call *it's* Suspend method.
 
Back
Top