DaemonFish
asked on
Calling a Backgroundworker from a DoWork event of another BackgroundWorker
I have a small problem when calling a Backgroundworker from a DoWork event of another BackgroundWorker.
The problem is that when the DoWork method of the second BackgroundWorker is finished, the RunWorkerCompleted event is not invoked. When I start the same BackgroundWorker from another place in my program (not from inside a BackgroundWorker), then RunWorkerCompleted is invoked as expected.
Do anyone know any way around this problem, or at least the reason why the BackgroundWorker behaves like this?
The problem is that when the DoWork method of the second BackgroundWorker is finished, the RunWorkerCompleted event is not invoked. When I start the same BackgroundWorker from another place in my program (not from inside a BackgroundWorker), then RunWorkerCompleted is invoked as expected.
Do anyone know any way around this problem, or at least the reason why the BackgroundWorker behaves like this?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
This did not solve my problem, but it did at least give me enough insight into how BackgroundWorkers work so that I could modify the basic structure of the program to make it work as it should.
If that doesn't work, can you show us some example code so we can attempt to reproduce the problem?