Skip to content

Commit

Permalink
Drop inner @MainActor from withMainSerialExecutor (#28)
Browse files Browse the repository at this point in the history
The inner operation is implicitly main actor, so no need to be explicit
about it.

Fixes #27.
  • Loading branch information
stephencelis authored Jun 16, 2024
1 parent 42e2ad3 commit 13baaa8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/ConcurrencyExtras/MainSerialExecutor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
/// - Parameter operation: An operation to be performed on the main serial executor.
@MainActor
public func withMainSerialExecutor(
@_implicitSelfCapture operation: @MainActor @Sendable () async throws -> Void
@_implicitSelfCapture operation: @Sendable () async throws -> Void
) async rethrows {
let didUseMainSerialExecutor = uncheckedUseMainSerialExecutor
defer { uncheckedUseMainSerialExecutor = didUseMainSerialExecutor }
Expand Down

0 comments on commit 13baaa8

Please sign in to comment.