From 66700260fb00151eeba80f7cc1e30642784c25fa Mon Sep 17 00:00:00 2001 From: Sami Samhuri Date: Sun, 18 Aug 2024 09:32:06 -0700 Subject: [PATCH] Finish writing comment and add FIXME for macOS runtime error --- SJSAssetExportSession/SampleWriter.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/SJSAssetExportSession/SampleWriter.swift b/SJSAssetExportSession/SampleWriter.swift index e9873f7..5d11425 100644 --- a/SJSAssetExportSession/SampleWriter.swift +++ b/SJSAssetExportSession/SampleWriter.swift @@ -21,7 +21,8 @@ actor SampleWriter { ) // Execute this actor on the same queue we use to request media data so we can use - // `assumeIsolated` to ensure that we + // `assumeIsolated` to ensure that we serialize access to our state without creating + // tasks and doing lots of needless context-switching. public nonisolated var unownedExecutor: UnownedSerialExecutor { queue.asUnownedSerialExecutor() } @@ -228,6 +229,7 @@ actor SampleWriter { return await withTaskCancellationHandler { await withCheckedContinuation { continuation in self.videoInput!.requestMediaDataWhenReady(on: queue) { + #warning("FIXME: why is this broken on macOS?!") self.assumeIsolated { _self in guard !_self.isCancelled else { log.debug("Cancelled while encoding video")