Skip to content

Commit 8fed7e6

Browse files
pblazejclaude
andcommitted
fix: revert AsyncDebounce.schedule to @sendable for Swift 6.0.2
CI on Xcode 16.2 (Swift 6.0.2) rejected the sending migration: the sole caller (Transport.swift:107) passes a self-isolated closure { try await self.createAndSendOffer() } into Debounce (a separate actor). Swift 6.0.2's region analyzer flags this as a strongly- transferred-parameter race; 6.0.3+ accepts it but the project floor is Xcode 16.2. The cross-actor boundary (caller's actor → Debounce actor) is the specific surface 6.0.2 scrutinizes more strictly. The other helpers migrated in 82ffe16 don't cross actor boundaries the same way and remain unaffected. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent d60f2ce commit 8fed7e6

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Sources/LiveKit/Support/Async/AsyncDebounce.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ actor Debounce {
3232
_task?.cancel()
3333
}
3434

35-
func schedule(_ action: sending @escaping () async throws -> Void) {
35+
func schedule(_ action: @Sendable @escaping () async throws -> Void) {
3636
_task?.cancel()
3737
_task = Task.detached(priority: .utility) {
3838
try? await Task.sleep(nanoseconds: UInt64(self._delay * 1_000_000_000))

0 commit comments

Comments
 (0)