Skip to content

Commit

Permalink
confused compiler.
Browse files Browse the repository at this point in the history
  • Loading branch information
bsneed committed Nov 17, 2023
1 parent c08da93 commit cf0be31
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions Sources/Segment/Analytics.swift
Original file line number Diff line number Diff line change
Expand Up @@ -441,13 +441,9 @@ extension OperatingMode {
// main, ignore it, and use the default queue. this prevents
// a possible deadlock.
if queue === DispatchQueue.main {
OperatingMode.defaultQueue.asyncAndWait(execute: {
task()
})
OperatingMode.defaultQueue.asyncAndWait(execute: task)
} else {
queue.asyncAndWait(execute: {
task()
})
queue.asyncAndWait(execute: task)
}
}
}
Expand Down

0 comments on commit cf0be31

Please sign in to comment.