Click here to Skip to main content
16,014,662 members
Home / Discussions / C#
   

C#

 
GeneralRe: How Do I Write A "Binary" File? Pin
PIEBALDconsult7-May-08 11:09
mvePIEBALDconsult7-May-08 11:09 
GeneralRe: How Do I Write A "Binary" File? Pin
GuyThiebaut7-May-08 11:12
professionalGuyThiebaut7-May-08 11:12 
AnswerRe: How Do I Write A "Binary" File? Pin
Spacix One7-May-08 10:54
Spacix One7-May-08 10:54 
AnswerRe: How Do I Write A "Binary" File? Pin
PIEBALDconsult7-May-08 11:00
mvePIEBALDconsult7-May-08 11:00 
GeneralRe: How Do I Write A "Binary" File? Pin
That Asian Guy7-May-08 11:16
That Asian Guy7-May-08 11:16 
QuestionSaving/Loading settings from Windows Service Pin
jchalfant7-May-08 9:48
jchalfant7-May-08 9:48 
AnswerRe: Saving/Loading settings from Windows Service Pin
jchalfant8-May-08 3:05
jchalfant8-May-08 3:05 
QuestionWaiting for other threads Pin
Roger Alsing7-May-08 8:56
Roger Alsing7-May-08 8:56 
If I fire up a few threads and then want to stop execution in my main thread untill those threads are finished.
What is the most correct way to wait for those threads?

I've always been cheeting and use a dumb loop which checks some condition and then sleeps x ms if the condition was not met.
But I guess thats far from optimal.
(Although thats what I read that lock{}/monitor.tryenter does internally.)


pseudo sample of what I do:

void Foo()
{
perform some async tasks
wait untill all of them are done // whats the best way to achive this part?
return
}
AnswerRe: Waiting for other threads Pin
Gareth H7-May-08 9:03
Gareth H7-May-08 9:03 
GeneralRe: Waiting for other threads Pin
Roger Alsing7-May-08 10:08
Roger Alsing7-May-08 10:08 
AnswerRe: Waiting for other threads Pin
User 66587-May-08 9:03
User 66587-May-08 9:03 
AnswerRe: Waiting for other threads Pin
Broken Bokken7-May-08 9:19
Broken Bokken7-May-08 9:19 
GeneralRe: Waiting for other threads Pin
Roger Alsing7-May-08 10:06
Roger Alsing7-May-08 10:06 
GeneralRe: Waiting for other threads Pin
Spacix One7-May-08 10:35
Spacix One7-May-08 10:35 
GeneralRe: Waiting for other threads Pin
Roger Alsing7-May-08 11:12
Roger Alsing7-May-08 11:12 
GeneralRe: Waiting for other threads Pin
GuyThiebaut7-May-08 10:51
professionalGuyThiebaut7-May-08 10:51 
GeneralRe: Waiting for other threads Pin
Spacix One7-May-08 11:01
Spacix One7-May-08 11:01 
QuestionLooking for HELPFUL information on my event log issues Pin
LongRange.Shooter7-May-08 7:25
LongRange.Shooter7-May-08 7:25 
AnswerRe: Looking for HELPFUL information on my event log issues [modified] Pin
DaveyM697-May-08 8:57
professionalDaveyM697-May-08 8:57 
QuestionCannot create an instance of the abstract class or interface 'Excel.Application Pin
Dominic Burford7-May-08 5:14
professionalDominic Burford7-May-08 5:14 
AnswerRe: Cannot create an instance of the abstract class or interface 'Excel.Application Pin
Giorgi Dalakishvili7-May-08 5:21
mentorGiorgi Dalakishvili7-May-08 5:21 
AnswerRe: Cannot create an instance of the abstract class or interface 'Excel.Application Pin
MarkB7777-May-08 13:07
MarkB7777-May-08 13:07 
QuestionRemoting in dot net Pin
ilango gandhi7-May-08 5:07
ilango gandhi7-May-08 5:07 
AnswerRe: Remoting in dot net Pin
led mike7-May-08 5:14
led mike7-May-08 5:14 
AnswerRe: Remoting in dot net Pin
Cranky7-May-08 5:33
Cranky7-May-08 5:33 

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.