Click here to Skip to main content
15,896,207 members
Home / Discussions / C#
   

C#

 
QuestionRe: BackgroundWorker.IsBusy failure!? Pin
Chesnokov Yuriy23-May-10 1:32
professionalChesnokov Yuriy23-May-10 1:32 
AnswerRe: BackgroundWorker.IsBusy failure!? Pin
DaveyM6923-May-10 2:10
professionalDaveyM6923-May-10 2:10 
AnswerRe: BackgroundWorker.IsBusy failure!? Pin
Chesnokov Yuriy23-May-10 4:04
professionalChesnokov Yuriy23-May-10 4:04 
GeneralRe: BackgroundWorker.IsBusy failure!? Pin
DaveyM6923-May-10 4:24
professionalDaveyM6923-May-10 4:24 
GeneralRe: BackgroundWorker.IsBusy failure!? Pin
Luc Pattyn23-May-10 5:09
sitebuilderLuc Pattyn23-May-10 5:09 
AnswerRe: BackgroundWorker.IsBusy failure!? Pin
DaveyM6923-May-10 3:36
professionalDaveyM6923-May-10 3:36 
AnswerRe: BackgroundWorker.IsBusy failure!? Pin
Luc Pattyn23-May-10 2:24
sitebuilderLuc Pattyn23-May-10 2:24 
GeneralRe: BackgroundWorker.IsBusy failure!? Pin
Chesnokov Yuriy23-May-10 3:55
professionalChesnokov Yuriy23-May-10 3:55 
There is windows service application that should access some network resource and get data from it (e.g. SQL server, network server with some files, etc...)

There might be N such threads running in parallel each connecting to its own resource. Thus there are N instances of the helper class (performing such remote data collection) in the List array in the instance field of the service.

4. They need to run in parallel not in sequence one after another.

5. Timer is System.Threading.Timer. I'm using logging with milliseconds marks and can confirm accuracy depending on cpu load.


That is the timer tick function:

for (int i = 0; i < this.drives.Count; i++)
{
    if (this.drvBackgroundWorkers[i].IsBusy == false)
    {
         BackgroundWorkerArgument argument = new BackgroundWorkerArgument()
         {
             threadId = i,
             drive = this.drives[i]
         };
         this.drvBackgroundWorkers[i].RunWorkerAsync(argument);
    }                                
}


drvBackgroundWorkers is not accessed in any thread code only in that tick function.

I wonder the reason for a failure??
Чесноков

GeneralRe: timer ticks overlap [modified] Pin
Luc Pattyn23-May-10 4:23
sitebuilderLuc Pattyn23-May-10 4:23 
QuestionPreventing DataGridView column from auto-resizing when double-clicking the column header divider Pin
eyalbi00722-May-10 22:23
eyalbi00722-May-10 22:23 
QuestionAnybody? Please, I'm so stuck here... Pin
eyalbi00723-May-10 3:53
eyalbi00723-May-10 3:53 
AnswerHave a little patience... Pin
OriginalGriff23-May-10 4:34
mveOriginalGriff23-May-10 4:34 
QuestionRe: Preventing DataGridView column from auto-resizing when double-clicking the column header divider Pin
nicos2817-Oct-11 3:03
nicos2817-Oct-11 3:03 
QuestionPlz help me Pin
dia 201022-May-10 22:04
dia 201022-May-10 22:04 
AnswerRe: Plz help me Pin
Abhinav S22-May-10 22:20
Abhinav S22-May-10 22:20 
Generalthis chunck of code have same results Pin
dia 201023-May-10 1:26
dia 201023-May-10 1:26 
AnswerRe: Plz help me Pin
Not Active23-May-10 3:38
mentorNot Active23-May-10 3:38 
Generalgetting ip address of client on server side Pin
dia 201023-May-10 18:53
dia 201023-May-10 18:53 
QuestionHow to include in installer Access Database 2003.? Pin
joynil22-May-10 17:51
joynil22-May-10 17:51 
AnswerRe: How to include in installer Access Database 2003.? Pin
PIEBALDconsult23-May-10 7:08
mvePIEBALDconsult23-May-10 7:08 
QuestionWhats iS THE Problem Of MY code in Monitor class For Resolve of Race Condition Pin
shahramkeyboard22-May-10 11:26
shahramkeyboard22-May-10 11:26 
AnswerRe: Whats iS THE Problem Of MY code in Monitor class For Resolve of Race Condition Pin
Luc Pattyn22-May-10 11:49
sitebuilderLuc Pattyn22-May-10 11:49 
Questionuse of ? and : [Solved] Pin
William Winner22-May-10 11:22
William Winner22-May-10 11:22 
AnswerRe: use of ? and : Pin
Pete O'Hanlon22-May-10 11:27
mvePete O'Hanlon22-May-10 11:27 
GeneralRe: use of ? and : Pin
William Winner22-May-10 11:30
William Winner22-May-10 11:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.