Skip to content

Declare vars nonisolated to solve compiler warning #7954

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion Sources/Basics/Cancellator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public final class Cancellator: Cancellable, Sendable {
private let cancelling = ThreadSafeBox<Bool>(false)

private static let signalHandlerLock = NSLock()
private static var isSignalHandlerInstalled = false
nonisolated(unsafe) private static var isSignalHandlerInstalled = false

public init(observabilityScope: ObservabilityScope?) {
self.observabilityScope = observabilityScope
Expand Down
2 changes: 1 addition & 1 deletion Sources/Basics/HTTPClient/LegacyHTTPClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public final class LegacyHTTPClient: Cancellable {

// static to share across instances of the http client
private static let hostsErrorsLock = NSLock()
private static var hostsErrors = [String: [Date]]()
nonisolated(unsafe) private static var hostsErrors = [String: [Date]]()

public init(configuration: LegacyHTTPClientConfiguration = .init(), handler: Handler? = nil) {
self.configuration = configuration
Expand Down