2 using System
.Threading
.Tasks
;
3 using System
.Threading
;
7 ManualResetEvent mre
= new ManualResetEvent (false);
8 ManualResetEvent mre_task
= new ManualResetEvent (false);
10 public async Task
<int> TestTaskGeneric ()
12 await Task
.Factory
.StartNew (() => {
16 }).ConfigureAwait (false);;
21 public static int Main ()
25 var t2
= c
.TestTaskGeneric ();
26 if (t2
.Status
!= TaskStatus
.WaitingForActivation
)
29 c
.mre_task
.WaitOne (3000);
32 if (!Task
.WaitAll (new[] { t2 }
, 3000))
38 if (t2
.Status
!= TaskStatus
.RanToCompletion
)