CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2014

    BackgroundWorker problem


    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.

  2. #2
    Arjay's Avatar
    Arjay is offline Moderator / MS MVP Power Poster
    Join Date
    Aug 2004

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

On-Demand Webinars (sponsored)

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.