I get this error if I click a button that starts the backgroundworker twice.
This BackgroundWorker is currently busy and cannot run multiple tasks concurrently
How can I avoid this?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Simple: Don’t start the BackgroundWorker twice.
You can check if it is already running by using the
IsBusyproperty, so just change this code:to this:
Update:
If you do actually need to launch multiple background tasks at the same time, you can simply create multiple BackgroundWorker objects