// RUN: %target-run-simple-swift(-Xfrontend -enable-experimental-concurrency %import-libdispatch -parse-as-library) | %FileCheck %s --dump-input=always

// REQUIRES: executable_test
// REQUIRES: concurrency

// rdar://76038845
// UNSUPPORTED: use_os_stdlib

// This test is flaky on VS2017 (unknown reasons)
// UNSUPPORTED: MSVC_VER=15.0

// This test is failing on windows. SR-14447.
//
// UNSUPPORTED: OS=windows-msvc

@available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *)
@main struct Main {
  static func main() async {
    let handle = detach {
      while (!Task.isCancelled) { // no need for await here, yay
        print("waiting")
      }

      print("done")
    }

    handle.cancel()

    // CHECK: done
    await handle.get()
  }
}

// RUN: %target-run-simple-swift(-Xfrontend -enable-experimental-concurrency %import-libdispatch -parse-as-library) | %FileCheck %s --dump-input=always

// REQUIRES: executable_test
// REQUIRES: concurrency

// rdar://76038845
// UNSUPPORTED: use_os_stdlib

// This test is flaky on VS2017 (unknown reasons)
// UNSUPPORTED: MSVC_VER=15.0

@available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *)
@main struct Main {
  static func main() async {
    let handle = detach {
      while (!Task.isCancelled) { // no need for await here, yay
        print("waiting")
      }

      print("done")
    }

    handle.cancel()

    // CHECK: done
    await handle.get()
  }
}

--- 
+++ 
@@ -8,6 +8,10 @@
 
 // This test is flaky on VS2017 (unknown reasons)
 // UNSUPPORTED: MSVC_VER=15.0
+
+// This test is failing on windows. SR-14447.
+//
+// UNSUPPORTED: OS=windows-msvc
 
 @available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *)
 @main struct Main {
[build-wrangler] Disable test that is failing on windows.

SR-14447
