Click here to Skip to main content
15,895,656 members
Home / Discussions / C#
   

C#

 
AnswerRe: Urgent question about Updates Pin
Christian Graus11-Sep-05 18:49
protectorChristian Graus11-Sep-05 18:49 
GeneralRe: Urgent question about Updates Pin
nidhelp11-Sep-05 19:41
nidhelp11-Sep-05 19:41 
GeneralRe: Urgent question about Updates Pin
Christian Graus12-Sep-05 12:00
protectorChristian Graus12-Sep-05 12:00 
QuestionBroadcastEventWindow not responding and program lockup Pin
0ryan011-Sep-05 16:19
0ryan011-Sep-05 16:19 
AnswerRe: BroadcastEventWindow not responding and program lockup Pin
S. Senthil Kumar11-Sep-05 21:56
S. Senthil Kumar11-Sep-05 21:56 
AnswerRe: BroadcastEventWindow not responding and program lockup Pin
leppie11-Sep-05 22:00
leppie11-Sep-05 22:00 
QuestionThreading in C# ! Pin
lucdt11-Sep-05 16:17
lucdt11-Sep-05 16:17 
AnswerRe: Threading in C# ! Pin
Andy Brummer11-Sep-05 17:50
sitebuilderAndy Brummer11-Sep-05 17:50 
If you have 8 threads and one task per thread which completes when the thread is complete, then you can do something like this:

[edit]
I just re-read the docs and WaitAll won't work for threads. The best you can do is something like what I have below, I'd use delegates and use beginInvoke and endInvoke because you can use WaitHandle.WaitAll plus your threads are running from the thread pool so it will be faster.
[/edit]

bool WaitForThreads(Thread[] threads)
{
  foreach(Thread t in threads)
  {
    if (!t.Join(1))
    {
       return false;
    }
  }
  return true;
}

Then in your function

  while (!WaitForThreads(threads))
     Application.DoEvents();



I can imagine the sinking feeling one would have after ordering my book,
only to find a laughably ridiculous theory with demented logic once the book arrives - Mark McCutcheon


-- modified at 23:51 Sunday 11th September, 2005
GeneralRe: Threading in C# ! Pin
lucdt11-Sep-05 18:26
lucdt11-Sep-05 18:26 
Questionform flickers when z-order changed Pin
g00fyman11-Sep-05 15:48
g00fyman11-Sep-05 15:48 
QuestionProblem inserting records Pin
rich_wenger11-Sep-05 12:15
rich_wenger11-Sep-05 12:15 
AnswerRe: Problem inserting records Pin
Christian Graus11-Sep-05 15:26
protectorChristian Graus11-Sep-05 15:26 
GeneralRe: Problem inserting records Pin
rich_wenger12-Sep-05 11:00
rich_wenger12-Sep-05 11:00 
GeneralRe: Problem inserting records Pin
Christian Graus12-Sep-05 12:02
protectorChristian Graus12-Sep-05 12:02 
AnswerRe: Problem inserting records Pin
leppie11-Sep-05 22:20
leppie11-Sep-05 22:20 
GeneralRe: Problem inserting records Pin
rich_wenger12-Sep-05 11:05
rich_wenger12-Sep-05 11:05 
GeneralRe: Problem inserting records Pin
Christian Graus12-Sep-05 12:08
protectorChristian Graus12-Sep-05 12:08 
GeneralRe: Problem inserting records Pin
rich_wenger12-Sep-05 12:42
rich_wenger12-Sep-05 12:42 
GeneralRe: Problem inserting records Pin
Christian Graus12-Sep-05 12:45
protectorChristian Graus12-Sep-05 12:45 
GeneralRe: Problem inserting records Pin
rich_wenger12-Sep-05 13:08
rich_wenger12-Sep-05 13:08 
GeneralRe: Problem inserting records Pin
Christian Graus12-Sep-05 13:13
protectorChristian Graus12-Sep-05 13:13 
GeneralRe: Problem inserting records Pin
rich_wenger12-Sep-05 13:26
rich_wenger12-Sep-05 13:26 
GeneralRe: Problem inserting records Pin
Christian Graus12-Sep-05 13:35
protectorChristian Graus12-Sep-05 13:35 
QuestionHow to use this in another handler?? Pin
Anonymous11-Sep-05 12:08
Anonymous11-Sep-05 12:08 
AnswerRe: How to use this in another handler?? Pin
Mohamad Al Husseiny11-Sep-05 12:15
Mohamad Al Husseiny11-Sep-05 12:15 

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.