Fix spelling of detach (#1865)
Motivation: The spelling of detach changed. This patch adopts the new spelling. Modifications: Changed detach to Task.detached. Result: 5.5 should build again.
This commit is contained in:
parent
43fa7686db
commit
47b3501592
|
@ -66,7 +66,7 @@ func main() async {
|
|||
let dg = DispatchGroup()
|
||||
dg.enter()
|
||||
if #available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *) {
|
||||
detach {
|
||||
Task.detached {
|
||||
await main()
|
||||
dg.leave()
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@ extension EventLoopPromise {
|
|||
/// - parameters:
|
||||
/// - body: The `async` function to run.
|
||||
public func completeWithAsync(_ body: @escaping () async throws -> Value) {
|
||||
detach {
|
||||
Task.detached {
|
||||
do {
|
||||
let value = try await body()
|
||||
self.succeed(value)
|
||||
|
|
Loading…
Reference in New Issue