3 using System
.Diagnostics
;
4 using System
.Threading
;
5 using System
.Threading
.Tasks
;
11 for (int i
= 0; i
< 1000; ++i
) {
12 ProcessStartInfo psi
= new ProcessStartInfo () {
14 Arguments
= "hello 1>/dev/null",
17 Process p
= Process
.Start (psi
);
19 ManualResetEvent mre
= new ManualResetEvent (false);
21 Task t
= Task
.Run (() => {
23 if (!p
.WaitForExit (1000))
27 if (!mre
.WaitOne (1000))
29 if (!p
.WaitForExit (1000))