fix(iphone): sendable hand buffer handoff

This commit is contained in:
clement
2026-06-30 21:47:29 +02:00
parent bb90820988
commit b2dab64aae
@@ -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 }