Skip to content

Commit 78b16ac

Browse files
psypealclaude
andcommitted
fix: add @unchecked Sendable conformances for ORTSession and ORTValue
ONNX Runtime types are used exclusively within the ONNXSessionManager actor, making cross-boundary transfers safe. Fixes Swift 6 concurrency errors. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 5adfdb8 commit 78b16ac

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

App/Services/TTS/ONNXSessionManager.swift

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,13 @@ actor ONNXSessionManager {
8787
}
8888
}
8989

90+
// MARK: - Sendable Conformances for ONNX Runtime Types
91+
92+
// ORTSession and ORTValue are used exclusively within the ONNXSessionManager actor,
93+
// so cross-boundary transfers are safe in practice.
94+
extension ORTSession: @retroactive @unchecked Sendable {}
95+
extension ORTValue: @retroactive @unchecked Sendable {}
96+
9097
// MARK: - Memory Pressure Handling
9198

9299
extension ONNXSessionManager {

0 commit comments

Comments
 (0)