views:

87

answers:

2

any idea suggestion about BGW for long-running operation?

+4  A: 

Yes it is :). There is nothing inherently wrong in having long-running operations in a BackgroundWorker or a ThreadPool... if there are deadlocks in the code because of long-running operations, then there is something wrong with the code.

Lirik
+1  A: 

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

TheSean
thanks, know about that.
Benny