|
-
Jul 28th, 2008, 04:57 AM
#1
Thread Starter
Addicted Member
[ask] about backgroundworker
i have a code like this
Code:
timer1_tick.....
backgroundworker1.runsynworker
if x = 10 then
timer1.stop
end
timer1.interval = 600
the question is
sometimes i run this code there's no error
but other times there's an error backgroundworker1 is busy...
why it can happen????
how to solve it become no more error with the fix timer interval....
thx
-
Jul 28th, 2008, 08:33 AM
#2
Re: [ask] about backgroundworker
you get that error because the background worker is still processing something...
The only thing you can do that I know of is to just check the IsBusy property of the backgroundworker before calling it again.
-
Jul 28th, 2008, 09:41 AM
#3
Re: [ask] about backgroundworker
Just out of curiousity, what are you calling in the background worker that needs to be called 10 times in intervals of 600ms??
-
Jul 28th, 2008, 10:26 PM
#4
Thread Starter
Addicted Member
Re: [ask] about backgroundworker
 Originally Posted by MaximilianMayrhofer
Just out of curiousity, what are you calling in the background worker that needs to be called 10 times in intervals of 600ms??
just the complex calculation of math
how to solve it become no more busy???
-
Jul 28th, 2008, 10:37 PM
#5
Re: [ask] about backgroundworker
You're going to have to give far more detail than that. Either you should just be running the BackgroundWorker once and doing all the work in that one run or you shouldn't be using it at all.
-
Jul 28th, 2008, 10:47 PM
#6
Re: [ask] about backgroundworker
This is for a game, isn't it?
-
Jul 28th, 2008, 10:50 PM
#7
Thread Starter
Addicted Member
Re: [ask] about backgroundworker
 Originally Posted by MaximilianMayrhofer
This is for a game, isn't it?
no it's not
it's an hash program
thx
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|