|
-
Apr 1st, 2013, 08:27 AM
#14
Fanatic Member
Re: BackgroundMultiWorker
John -
One additional question...is it possible to pass more than just the token (GUID) to the DoWork event parameter of the worker? My project has a large datatable and my goal is to break it into multiple sub-tables (e.g., each one having 20 rows from the larger datatable). I would like to start each worker and pass it one of these sub-tables along with its token parameter. Then the DoWork event would perform the processing of the sub-table.
I have used the BackgroundWorker in other projects and know how to send multiple parameters with the RunWorkerAsync event. Can I also do this with the BackgroundMultiWorker?
If not, then I would probably look at creating a collection that would contain key/value pairs of tokens and sub-tables. I would have to manage this collection (adding the key/value pair with each workers' RunWorkerAsync event and removing key/value pairs with each worker's ProcessCompleted event, etc.).
Thanks again for any advice you can give me.
Mark
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
|