Skip to content
This repository has been archived by the owner on Jun 27, 2023. It is now read-only.

Thread.detachNewThread available on iOS 10.0 and later. #206

Merged
merged 2 commits into from
Jun 8, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Sources/Core/Thread+Async.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ extension Thread {
/// - parameters:
/// - work: Closure to be called on new thread.
public static func async(_ work: @escaping () -> Void) {
if #available(OSX 10.12, *) {
if #available(macOS 10.12, iOS 10.0, *) {
Thread.detachNewThread(work)
} else {
fatalError("macOS 10.12 or later required to call Thread.async(_:)")
fatalError("macOS 10.12/iOS 10.0 or later required to call Thread.async(_:)")
}
}
}