Skip to content

Commit

Permalink
Update ObservableSingleTask.swift
Browse files Browse the repository at this point in the history
  • Loading branch information
swiftuiux committed Dec 1, 2024
1 parent ecf86ac commit d05dc1e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Sources/async-task/task/ObservableSingleTask.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@

import SwiftUI

#if compiler(>=5.9) && canImport(Observation)

extension Async {

/// A view model for managing a cancellable asynchronous task in a SwiftUI environment.
///
/// - Note: Exclusively operates on the main actor to ensure thread safety, making it suitable for
Expand Down Expand Up @@ -123,3 +126,5 @@ extension Async {
}
}
}

#endif

0 comments on commit d05dc1e

Please sign in to comment.