From b2dab64aae994e5bf99bb8cc1894de85e91575be Mon Sep 17 00:00:00 2001 From: clement Date: Tue, 30 Jun 2026 21:47:29 +0200 Subject: [PATCH] fix(iphone): sendable hand buffer handoff --- .../Sources/ARBodyTracker/ARBodySession.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/iphone-arbody/ARBodyTracker.swiftpm/Sources/ARBodyTracker/ARBodySession.swift b/iphone-arbody/ARBodyTracker.swiftpm/Sources/ARBodyTracker/ARBodySession.swift index 0f2bcff..a2c0193 100644 --- a/iphone-arbody/ARBodyTracker.swiftpm/Sources/ARBodyTracker/ARBodySession.swift +++ b/iphone-arbody/ARBodyTracker.swiftpm/Sources/ARBodyTracker/ARBodySession.swift @@ -166,7 +166,9 @@ final class ARBodySession: NSObject, ObservableObject, ARSessionDelegate { } else { self.lastVisionTime = t self.visionBusy = true - let buf = img // CVPixelBuffer captured for the worker + // CVPixelBuffer is non-Sendable; this is a deliberate + // single-owner handoff to the Vision worker queue. + nonisolated(unsafe) let buf = img self.visionQueue.async { self.runVision(on: buf, timestamp: t) Task { @MainActor in self.visionBusy = false }