Implementing the BackgroundWorker component - today(source included)

Juval wrote a very cool article(registration required) about implementing the BackGroundWorker component found in VS.Net 2005 in C# today. Just for the heck of it (and because I needed to), I implemented this component (the article only shows some of the code needed to make this work).

You can get the source code here.

If you don't know what the BackgroundWorker component is, it's a simple class really, that allows you to do asynchronous multi threaded operations in your winform apps with much less hassle than needs to be. I wrote about these problems in my blog as well. Juval shows how to implement it with ease and explains lots of the concepts regarding multi threading along the way. Very interesting and already very helpful in a project I'm working on.

Published Wednesday, June 16, 2004 1:27 PM by RoyOsherove
Filed under:

Comments

Wednesday, June 16, 2004 9:28 AM by Yoeri

# re: Implementing the BackgroundWorker component - today(source included)

Wednesday, June 16, 2004 1:01 PM by Roy Osherove

# re: Implementing the BackgroundWorker component - today(source included)

Thanks for the link Yoeri :)
Wednesday, June 16, 2004 6:10 PM by shark

# re: Implementing the BackgroundWorker component - today(source included)

hmm, I'm interested in the article!! but after registering with devx, it says i do not have access to the content. back to the drawing-board for them!! ;-)
Thursday, June 17, 2004 7:06 AM by Yoeri

# re: Implementing the BackgroundWorker component - today(source included)

Downloaded a demo app of infragistics, it had the backgroundworker from IDesign along with a word document explaining the working of the .NET 2.0 version and their implementation in fw 1.1.

You can always get the demo app, or I can send you the doc file, it helped me a lot in understanding the multithreading stuff ...
Thursday, June 17, 2004 12:31 PM by shark

# re: Implementing the BackgroundWorker component - today(source included)

I'd love to have the doc file.. I can basically follow the code and understand it, but I'd appreciate more insight. Could you send it to: [threading at sitechno . com]
Thanks!
Friday, June 18, 2004 11:41 AM by Oskar Austegard

# re: Implementing the BackgroundWorker component - today(source included)

Is the document any different from Juval's "free" article at http://www.code-magazine.com/article.aspx?quickid=0403071?

Also - has anyone come up with a solution they feel comfortable with for dealing with methods that have multiple parameters and ref/out arguments? (I.e. passing those values through the DoWorkEventArgs and RunWorkerCompletedEventArgs).

And before I go off doing this myself (http://blahblahg.blogspot.com/2004/06/idea-typedbackgroundworker.html) - does anyone know of any work on creating typed BackgroundWorker components, or versions specific to streamlining async webservice calls?
Saturday, June 19, 2004 2:23 PM by Yoeri

# re: Implementing the BackgroundWorker component - today(source included)

Oskar, The doc file is the same as the article you are referencing ...
Sunday, June 20, 2004 3:09 PM by shark

# re: Implementing the BackgroundWorker component - today(source included)

oskar, if you need the doc file that youri sent me, give me your email addy, I'll be happy to send you.
Sunday, June 20, 2004 3:10 PM by shark

# re: Implementing the BackgroundWorker component - today(source included)

or I could try to 'read' and realise you have the url.. ;-)))
Wednesday, July 26, 2006 2:44 PM by dba123

# re: Implementing the BackgroundWorker component - today(source included)

All I see is examples and inserts on using this for Windows Forms. What about doing inserts from a C# ASP.NET application, I assume I can do the same.