From d3afd90f79104f93c52a82cbac124abb577f5ce2 Mon Sep 17 00:00:00 2001 From: Giulio Starace Date: Mon, 27 Apr 2026 16:09:54 +0000 Subject: [PATCH] Tighten UNSYNC_MULTISTREAM: flag when syncs < streams (not syncs*2 < streams) --- kernelguard.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernelguard.py b/kernelguard.py index f086847..8ee3783 100644 --- a/kernelguard.py +++ b/kernelguard.py @@ -1303,8 +1303,8 @@ def detect_unsync_multistream(code: str | SubmissionFacts) -> list[dict]: "high", f"Python: {py_stream_creates} stream creates, no sync/wait primitives", )) - elif py_sync_calls * 2 < py_stream_creates: - # Significantly under-synchronized: fewer than half as many syncs as streams + elif py_sync_calls < py_stream_creates: + # Under-synchronized: fewer sync/wait calls than stream creates candidates.append(( "medium", f"Python: {py_stream_creates} stream creates, only {py_sync_calls} sync/wait calls",