I would use one instance of BackgroundWorker for each of your tasks. However, keep in mind that you can call the same delegate method several times in several different instances of the stream.
If you have one BackgroundWorker task for a long method task, you will have a lot of control over your methods. Also, as I understand it, when an instance of BackgroundWorker performs a task, it is busy with this background task and, therefore, makes it inaccessible to others. Maybe I'm wrong, but itβs the way I would do it, because the DoWork () event handler can only do what it is asked to do for this BackgroundWorker. Therefore, it seems to me impossible to perform completely different tasks for only one instance of BackgroundWorker.
Does it help?
Will marcouiller
source share