// RUN: %target-run-simple-swift(-parse-as-library -target %target-swift-5.1-abi-triple %import-libdispatch) | %FileCheck %s // REQUIRES: executable_test // REQUIRES: concurrency // REQUIRES: libdispatch // REQUIRES: rdar78576626 // rdar://76038845 // REQUIRES: concurrency_runtime // UNSUPPORTED: back_deployment_runtime // for sleep #if canImport(Darwin) import Darwin #elseif canImport(Glibc) import Glibc #elseif canImport(Android) import Android #endif @available(SwiftStdlib 5.1, *) class Runner { func run() async { while !Task.isCancelled { sleep(1) } } } @available(SwiftStdlib 5.1, *) actor Container { var generation = 0 var runners = [Int : Task]() func build(_ n: Int) { for _ in 0..