PC Review


Reply
Thread Tools Rate Thread

BackgroundWorker Classes?

 
 
JimTheAverage
Guest
Posts: n/a
 
      10th Nov 2009
I am writing an app that checks web pages for data for clients
automatically. In order to keep the interface from locking up during
intense loops, I was considering using backgroundworker objects.

While using a single backgroundworker object is simple enough, it is
not fast enough. And, looking at the code needed to raise progress
events and completion events, I was wondering if there was a method to
create an array of a single backgroundworker class and have them all
working (retrieving data and sorting it) without having them bump into
one another.

My thought was of a master backgroundworker that would launch and
manage several other background workers. This seems a bit complex
though, and I was wondering if anyone had tried this, has seen
examples of this or had any thoughts that may help me in this pursuit.

Thank you for your help.
 
Reply With Quote
 
 
 
 
John Bundy
Guest
Posts: n/a
 
      11th Nov 2009
I have something similar, what i did was create a background worker for each
site that loops until it sees that a file is ready and then places the
information into a table. The program is on a timer and every 10 seconds it
checks for a Done value in the table, if it finds it then it retrieves and
saves the data and marks the row as Retrieved and continues to the next. If
there are no more ready it resets the timer and 10 seconds later looks again.
Once it has downloaded all files it stops.
I don't have the backgroundworkers reporting status because it runs in the
background but you could certainly have a table that shows website, last
check time, progress, status etc.
One thing to note is that if you are using a Webbrowser control, you will
want to create a seperate one for each worker and dispose of it when done.
--
-John http://www.jmbundy.blogspot.com/
Please rate when your question is answered to help us and others know what
is helpful.


"JimTheAverage" wrote:

> I am writing an app that checks web pages for data for clients
> automatically. In order to keep the interface from locking up during
> intense loops, I was considering using backgroundworker objects.
>
> While using a single backgroundworker object is simple enough, it is
> not fast enough. And, looking at the code needed to raise progress
> events and completion events, I was wondering if there was a method to
> create an array of a single backgroundworker class and have them all
> working (retrieving data and sorting it) without having them bump into
> one another.
>
> My thought was of a master backgroundworker that would launch and
> manage several other background workers. This seems a bit complex
> though, and I was wondering if anyone had tried this, has seen
> examples of this or had any thoughts that may help me in this pursuit.
>
> Thank you for your help.
> .
>

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
What should I name my business classes given that LINQ data classes takes all table names? Ronald S. Cook Microsoft C# .NET 2 24th Jun 2008 02:57 AM
BackgroundWorker Capability For Non UI Classes =?Utf-8?B?QnJpYW4gUi4=?= Microsoft Dot NET Framework Forms 5 15th Mar 2006 09:59 PM
How i list or enumerate classes (names of classes in string format) from a certain namespace? please help. Jose Michael Meo R. Barrido Microsoft VB .NET 1 31st Dec 2004 12:13 PM
How i list or enumerate classes (names of classes in string format) from a certain namespace? please help. Jose Michael Meo R. Barrido Microsoft Dot NET 1 31st Dec 2004 12:13 PM
Managed __value type enums and classes inside __nogc classes Edward Diener Microsoft VC .NET 0 20th Jan 2004 04:52 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:00 AM.