diff --git a/WorkflowCombine/Sources/Worker.swift b/WorkflowCombine/Sources/Worker.swift index bf177e2d..15b136da 100644 --- a/WorkflowCombine/Sources/Worker.swift +++ b/WorkflowCombine/Sources/Worker.swift @@ -28,7 +28,7 @@ import Workflow /// If there is, and if the workers are 'equivalent', the context leaves the existing worker running. /// /// If there is not an existing worker of this type, the context will kick off the new worker (via `run`). -public protocol Worker: AnyWorkflowConvertible where Rendering == Void { +public protocol Worker: AnyWorkflowConvertible where Rendering == Void, Output: Sendable { /// The type of output events returned by this worker. associatedtype Output associatedtype WorkerPublisher: Publisher where diff --git a/WorkflowConcurrency/Sources/Worker.swift b/WorkflowConcurrency/Sources/Worker.swift index 4112b70e..5ff220b2 100644 --- a/WorkflowConcurrency/Sources/Worker.swift +++ b/WorkflowConcurrency/Sources/Worker.swift @@ -25,7 +25,7 @@ import Workflow /// If there is, and if the workers are 'equivalent', the context leaves the existing worker running. /// /// If there is not an existing worker of this type, the context will kick off the new worker (via `run`). -public protocol Worker: AnyWorkflowConvertible where Rendering == Void { +public protocol Worker: AnyWorkflowConvertible where Rendering == Void, Output: Sendable { /// The type of output events returned by this worker. associatedtype Output @@ -63,7 +63,7 @@ struct WorkerWorkflow: Workflow { let logger = WorkerLogger() let sink = context.makeOutputSink() context.runSideEffect(key: state) { lifetime in - let send: @MainActor(Output) -> Void = sink.send + let send: @MainActor (Output) -> Void = sink.send let task = Task(priority: .high) { logger.logStarted() let output = await worker.run() diff --git a/WorkflowReactiveSwift/Sources/Worker.swift b/WorkflowReactiveSwift/Sources/Worker.swift index 1360a70a..b0d72822 100644 --- a/WorkflowReactiveSwift/Sources/Worker.swift +++ b/WorkflowReactiveSwift/Sources/Worker.swift @@ -26,7 +26,7 @@ import Workflow /// If there is, and if the workers are 'equivalent', the context leaves the existing worker running. /// /// If there is not an existing worker of this type, the context will kick off the new worker (via `run`). -public protocol Worker: AnyWorkflowConvertible where Rendering == Void { +public protocol Worker: AnyWorkflowConvertible where Rendering == Void, Output: Sendable { /// The type of output events returned by this worker. associatedtype Output diff --git a/WorkflowRxSwift/Sources/Worker.swift b/WorkflowRxSwift/Sources/Worker.swift index c06b9d90..89bc1236 100644 --- a/WorkflowRxSwift/Sources/Worker.swift +++ b/WorkflowRxSwift/Sources/Worker.swift @@ -26,7 +26,7 @@ import Workflow /// If there is, and if the workers are 'equivalent', the context leaves the existing worker running. /// /// If there is not an existing worker of this type, the context will kick off the new worker (via `run`). -public protocol Worker: AnyWorkflowConvertible where Rendering == Void { +public protocol Worker: AnyWorkflowConvertible where Rendering == Void, Output: Sendable { /// The type of output events returned by this worker. associatedtype Output