Does BackgroundWorker work for long-term performance?

Any suggestions on BGW ideas for long-term performance?

+5
source share
2 answers

Yes it:). There is nothing inherently wrong with long operations in BackgroundWorker or ThreadPool ... if there are deadlocks in the code due to long operations, then something is wrong with the code.

+4
source

Suggestion: allow the operation to cancel. BGW allows this by setting the bool property. You need to periodically check this property in the DoWork method.

+1
source

All Articles