Skip to content
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/ComposableArchitecture/Effects/Concurrency.swift
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ import SwiftUI
) -> Self where Failure == Never {
var task: Task<Void, Never>?
return .future { callback in
task = Task(priority: priority) {
task = Task(priority: priority) { @MainActor in
guard !Task.isCancelled else { return }
let output = await operation()
guard !Task.isCancelled else { return }
Expand Down Expand Up @@ -85,7 +85,7 @@ import SwiftUI
) -> Self where Failure == Error {
Deferred<Publishers.HandleEvents<PassthroughSubject<Output, Failure>>> {
let subject = PassthroughSubject<Output, Failure>()
let task = Task(priority: priority) {
let task = Task(priority: priority) { @MainActor in
do {
try Task.checkCancellation()
let output = try await operation()
Expand Down