June 10th, 2014, 08:26 AM
I have a problem with background workers, say that I have at a time 50 bw but the number is reducing as they finish their jobs. The last bw's seems to stuck in their work and I cancel them. In this point (when all canceled or done) I have the processor running at 60-70% and the memory is not cleaned. Some help would be appreciated. Thanks.
June 10th, 2014, 09:02 AM
Re: BackgroundWorker problem
Without seeing code, it's going to be hard to help.
For not completing, add logging and/or set breakpoints and debug.
For resources not cleaning up, determing what references each thread is holding and reduce scope.
Consider using ThreadPool.QueueUserWorkItem, Task or async and await.
Click Here to Expand Forum to Full Width