rainerc / cr-data-manager

Automatically exported from code.google.com/p/cr-data-manager
1 stars 0 forks source link

cancellation of backgroundWorker does not work as expected #74

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Allright here's an error i found, if you cancel (close the progress window) it 
calculates the number of books done so far (25 in this case) then asks if you 
want to view the log... problem is it's still running the process in the 
background and i guess the file is locked because it's still being worked on.

Did you account for cancellation with the background worker?
backgroundworker.Worker.SupportsCancellation = true

and send cancel on the progress window close?
backgroundWorker.CancelAsync()

and allow for cancellation in the BackGroundWorker.DoWork Event by enclose the 
entire process in a if statement?
if not backgroundWorker1.CancellationPending: 

Original issue reported on code.google.com by rainer.c...@googlemail.com on 6 May 2013 at 7:33

GoogleCodeExporter commented 9 years ago
fixed in 1.0.3

Original comment by rainer.c...@googlemail.com on 6 May 2013 at 8:20