Files
Rintaro Ishizaki 1b652de1f0 Use Mutex directly for class/actor stored properties
ThreadSafeBox is a `class` wrapping a `Mutex<Value>`. When stored as
a property of another class or actor, the outer reference type already
provides identity, so the extra ThreadSafeBox class indirection is just a
redundant heap allocation. Replace `ThreadSafeBox<T>` with `Mutex<T>` at
those sites.

Function-local ThreadSafeBox uses are unchanged since they need class
identity to be capturable in `@Sendable` closures.

CustomBuildServerTestProject.buildServerBox is also unchanged: it is
value-captured into a closure stored before `super.init`, which a
~Copyable Mutex can't support without a class wrapper.

Port SourceKitD's fileprivate `computeIfNil` extension from ThreadSafeBox
to Mutex (now `borrowing`).
2026-06-18 15:11:53 -07:00
..
2025-12-02 12:27:27 +00:00