R
Roger Crawfis
I am using the new BackgroundWorker for an I/O intensive application and it
works great!!!
I have a few questions though that hopefully someone can answer. I know this
is possible with other components, but am curious as to what
BackgroundWorker can do.
1) All the documentation indicates a single DoWork. Can I assign multiple
delegates to the DoWork event? It seems like I ought to be able to since it
is a general event.
2) If I do, will it spawn a thread for each delegate? The events can fire
sequentially.
3) Do I need a RunWorkerCompleted delegate for each DoWork delegate? Here is
where the simple utility afforded by BackgroundWorker starts to break down.
I am reading and converting hundreds of files and what I want to do is have
3-5 threads working on this (with the ability for the user to cancel all of
the work). I know this is possible using general threading, but can
BackgroundWorker accomplish this?
Roger
works great!!!
I have a few questions though that hopefully someone can answer. I know this
is possible with other components, but am curious as to what
BackgroundWorker can do.
1) All the documentation indicates a single DoWork. Can I assign multiple
delegates to the DoWork event? It seems like I ought to be able to since it
is a general event.
2) If I do, will it spawn a thread for each delegate? The events can fire
sequentially.
3) Do I need a RunWorkerCompleted delegate for each DoWork delegate? Here is
where the simple utility afforded by BackgroundWorker starts to break down.
I am reading and converting hundreds of files and what I want to do is have
3-5 threads working on this (with the ability for the user to cancel all of
the work). I know this is possible using general threading, but can
BackgroundWorker accomplish this?
Roger