From fd4b1f205182538bc1936cf85b799958e95f40d6 Mon Sep 17 00:00:00 2001 From: Hiroshi Horie <548776+hiroshihorie@users.noreply.github.com> Date: Fri, 3 Oct 2025 17:22:31 +0800 Subject: [PATCH 1/2] fix --- Sources/LiveKit/Support/SerialRunnerActor.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/LiveKit/Support/SerialRunnerActor.swift b/Sources/LiveKit/Support/SerialRunnerActor.swift index 40f88f121..398fbd86e 100644 --- a/Sources/LiveKit/Support/SerialRunnerActor.swift +++ b/Sources/LiveKit/Support/SerialRunnerActor.swift @@ -21,8 +21,8 @@ actor SerialRunnerActor { func run(block: @Sendable @escaping () async throws -> Value) async throws -> Value { let task = Task { [previousTask] in - // Wait for the previous task to complete, but cancel it if needed - if let previousTask, !Task.isCancelled { + // Always wait for the previous task to maintain serial ordering + if let previousTask { // If previous task is still running, wait for it _ = try? await previousTask.value } From 00121cdbc4db5a0ffb8deb2386dd58cefc4b673f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C5=82az=CC=87ej=20Pankowski?= <86720177+pblazej@users.noreply.github.com> Date: Mon, 6 Oct 2025 09:24:44 +0200 Subject: [PATCH 2/2] Change --- .changes/serial-cancellation | 1 + 1 file changed, 1 insertion(+) create mode 100644 .changes/serial-cancellation diff --git a/.changes/serial-cancellation b/.changes/serial-cancellation new file mode 100644 index 000000000..f6efb63c7 --- /dev/null +++ b/.changes/serial-cancellation @@ -0,0 +1 @@ +patch type="fixed" "Serial operations cancellation semantics" \ No newline at end of file