Merge pull request #4003 from ntherning/ignore-disconnected-interfaces-in-HttpListene...
[mono.git] / mcs / tests / test-async-14.cs
index efda5d8f4e1037e02c00cbf1124f77fb088fa927..ff15d7fef75640a6197fb9a7eb00c724e05afe5e 100644 (file)
@@ -1,5 +1,3 @@
-// Compiler options: -langversion:future
-
 using System;
 using System.Threading.Tasks;
 using System.Threading;
@@ -8,7 +6,7 @@ class C
 {
        public async Task<int> TestResult ()
        {
-               if (await Task.Factory.StartNew (() => 8) != 9) {
+               if (await Task.Factory.StartNew (() => 8).ConfigureAwait (false) != 9) {
                        return 2;
                }
                
@@ -30,7 +28,7 @@ class C
                        return 3;
                
                Func<Task<int>> f = async () => {
-                       var tr = await Task.Factory.StartNew (() => 1);
+                       var tr = await Task.Factory.StartNew (() => 1).ConfigureAwait (false);
                        if (tr == 1)
                                return 3;