Skip to content

Use swift-tools-protocols's ThreadSafeBox#2673

Merged
rintaro merged 2 commits into
swiftlang:mainfrom
rintaro:migrate-threadsafebox-to-refbox
May 28, 2026
Merged

Use swift-tools-protocols's ThreadSafeBox#2673
rintaro merged 2 commits into
swiftlang:mainfrom
rintaro:migrate-threadsafebox-to-refbox

Conversation

@rintaro
Copy link
Copy Markdown
Member

@rintaro rintaro commented May 27, 2026

Delete sourcekit-lsp's Sources/SwiftExtensions/ThreadSafeBox.swift and the now-unused NSLock+WithLock.swift.
Use the Mutex-backed ThreadSafeBox from swift-tools-protocols

Adjust call sites for the new API: e.g. foo.value.mutate() with foo.withLock { $0.mutate() } because it doesn't provide _modify accessor.

Delete sourcekit-lsp's `Sources/SwiftExtensions/ThreadSafeBox.swift`
and the now-unused `NSLock+WithLock.swift`.
Use the `Mutex`-backed `ThreadSafeBox` from swift-tools-protocols'

Adjust call sites for the new API: e.g.
`foo.value.mutate()` with `foo.withLock { $0.mutate() }` because it
doesn't provide `_modify` accessor.
@rintaro
Copy link
Copy Markdown
Member Author

rintaro commented May 27, 2026

swiftlang/swift-tools-protocols#59
@swift-ci Please test

Copy link
Copy Markdown
Contributor

@hamishknight hamishknight left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@rintaro
Copy link
Copy Markdown
Member Author

rintaro commented May 27, 2026

swiftlang/swift-tools-protocols#59
@swift-ci Please test

@rintaro
Copy link
Copy Markdown
Member Author

rintaro commented May 28, 2026

swiftlang/swift-tools-protocols#59
@swift-ci Please test Windows

1 similar comment
@rintaro
Copy link
Copy Markdown
Member Author

rintaro commented May 28, 2026

swiftlang/swift-tools-protocols#59
@swift-ci Please test Windows

@rintaro rintaro merged commit c345e3a into swiftlang:main May 28, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants