David Kearns Central RSS 2.0
# Thursday, April 03, 2008

I'm primarily a web-based interface programmer, I haven't done non-web-based applications for my main gig for a while, though in the before web age I did dial-up applications (in ansi!). They, however, didn't need multi-threading for updating the GUI while doing the work in a separate thread. This is one thing that has always daunted me with Windows applications, perhaps VB and c++ programmers just like dealing with all the threading issues for fun. Finally I found this:

The BackgroundWorker Component allows a form to run an operation asynchronously. This is very useful when we deal with such kind of operations as database transactions, image downloads etc. In this case our user interface can hang (or not appear until loading will be finished). In this article I will show (step-by-step) how you can use the BackgroundWorker Component in .NET 2 applications to execute time-consuming operations. The examples are written using C#.

[ Using the BackgroundWorker Component in .NET 2 applications ]

Perhaps I was supposed to know that was there all along, of course since much of what I do in .net happens so quickly that multi-threading is useless, and the interface is all sent via HTML, etc., I've just never run across having to do this right, until today. Doing a DB import of 25K+ records from access into a local SQL server requires more time than the GUI updating would like, and this was the easy-peasey-lemon-squeezey way of doing that, let me tell you. Just drag this tool onto the playing field, and then double-click a few auto-stubbed event handlers, plus toggle the property "WorkerSupportsProgress", wire up what I want to get done with a call to notify the progress bar, wire in the progress bar updater, and voilĂ ! it's almost like I know what I'm doing...

Thursday, April 03, 2008 3:03:43 PM (Eastern Standard Time, UTC-05:00)  #    Comments [1] -
.net
Thursday, April 03, 2008 10:21:03 PM (Eastern Standard Time, UTC-05:00)
Heh, even ColdFusion supports multithreading now (CFTHREAD). I have yet to use it either, although some stuff I've read as examples sounds interesting.
Comments are closed.
Archive
<March 2010>
SunMonTueWedThuFriSat
28123456
78910111213
14151617181920
21222324252627
28293031123
45678910
Blogroll
About the author/Disclaimer

Disclaimer
The opinions expressed herein are my own personal opinions.

© Copyright 2010
David Kearns
Sign In
Statistics
Total Posts: 1300
This Year: 1
This Month: 0
This Week: 0
Comments: 1761
Themes
Pick a theme:
All Content © 2010, David Kearns
DasBlog theme 'Business' created by Christoph De Baene (delarou)