mirror of
https://github.com/apple/sourcekit-lsp.git
synced 2026-03-02 18:23:24 +01:00
Change all variables that are Atomic* types to not be nonisolated(unsafe)
Since the `Atomic*` types can not be marked as `Sendable` (because they aren’t C structs), we can change the variables to constants and can remove `nonisolated(unsafe)`.
This commit is contained in:
@@ -19,8 +19,7 @@ import SourceKitLSP
|
||||
public final class InProcessSourceKitLSPClient: Sendable {
|
||||
private let server: SourceKitLSPServer
|
||||
|
||||
/// `nonisolated(unsafe)` if fine because `nextRequestID` is atomic.
|
||||
private nonisolated(unsafe) var nextRequestID = AtomicUInt32(initialValue: 0)
|
||||
private let nextRequestID = AtomicUInt32(initialValue: 0)
|
||||
|
||||
/// Create a new `SourceKitLSPServer`. An `InitializeRequest` is automatically sent to the server.
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user