Skip to content

Commit

Permalink
refactor: add @_unsafeInheritExecutor and @inlinable to trace method (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
grdsdev authored Jun 5, 2024
1 parent 17f4cd6 commit 92a9047
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Sources/_Helpers/SupabaseLogger.swift
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,8 @@ extension SupabaseLogger {
}

@inlinable
@discardableResult
@_unsafeInheritExecutor
package func trace<R>(
using logger: (any SupabaseLogger)?,
@_inheritActorContext _ operation: @Sendable () async throws -> R,
Expand Down
4 changes: 3 additions & 1 deletion Sources/_Helpers/TaskLocalHelpers.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@
import Foundation

extension TaskLocal where Value == JSONObject {
@inlinable
@discardableResult
@inlinable package func withValue<R>(
@_unsafeInheritExecutor
package func withValue<R>(
merging valueDuringOperation: Value,
@_inheritActorContext operation: @Sendable () async throws -> R,
file: String = #fileID,
Expand Down

0 comments on commit 92a9047

Please sign in to comment.