Quote Originally Posted by C progammer View Post
I dont understand you, do you say that it relate to sleep?

Even ehen I edit my c code to , drop out the sleep and put some loops that take time
Paste ofCode
(those loops take about 18 seconds) , I get the "start" only when the c program finish
Well, I think so, but I wouldn't say I've fully got the hang of Windows processes and threads -- I think your process starts in the same thread as your C# program, and so when your C program calls Sleep your C# program is also put to sleep, but I'm not able to find chapter and verse about it.

Certainly when I used your original code, I didn't get any response from the C# program until after everything was finished. I was able to get an immediate response by modifying a program that did work, as mentioned above. I don't have anything C# here at home, but I can try your code when I get back to the office on Monday and see if those spin-waits give me the same trouble they're giving you.