2 using System
.Threading
.Tasks
;
3 using System
.Threading
;
7 async Task
<int> Lambda_1 ()
12 Func
<int> f
= () => a
;
13 res
= await Task
.Factory
.StartNew (f
).ConfigureAwait (false);
20 async Task
<int> Lambda_2 ()
25 Func
<int> f
= () => a
+ res
;
26 res
= await Task
.Factory
.StartNew (f
).ConfigureAwait (false);
33 async Task
<int> Lambda_3
<T
> ()
38 Func
<int> f
= () => a
;
39 res
= await Task
.Factory
.StartNew (f
).ConfigureAwait (false);
46 public static int Main ()
48 var t
= new Tester ().Lambda_1 ();
49 if (!Task
.WaitAll (new [] { t }
, 1000))
55 t
= new Tester ().Lambda_2 ();
56 if (!Task
.WaitAll (new [] { t }
, 1000))
62 t
= new Tester ().Lambda_3
<ulong>();
63 if (!Task
.WaitAll (new [] { t }
, 1000))
69 Console
.WriteLine ("ok");