[interp] Reduce computation under calc_section mutex
[mono-project.git] / mcs / tests / test-async-91.cs
blob405da3c3f9269be3b27bb7cb696cd03bfcf0d4c6
1 using System;
2 using System.Threading.Tasks;
4 class C : IDisposable
6 public void Dispose ()
8 Console.WriteLine ("Disposed");
9 TestClass.Passed++;
13 public class TestClass
15 public static int Passed;
17 public static async Task Test ()
19 using (var device_resource = new C ()) {
20 try {
21 Console.WriteLine ("aa");
22 return;
23 } finally {
24 await Task.Delay (0);
29 public static int Main()
31 Test ().Wait ();
32 if (Passed != 1)
33 return 1;
35 Console.WriteLine ("PASSED");
36 return 0;