Skip to content

Commit d956bad

Browse files
IntegerAlexCopilot
andauthored
Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent 5b4e85e commit d956bad

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

kakashi/core/logger.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -374,13 +374,13 @@ def shutdown_async_logging() -> None:
374374
"""Shutdown async logging gracefully."""
375375
global _async_worker
376376
if _async_worker and _async_worker.is_alive():
377-
# Signal shutdown
378-
_async_shutdown.set()
377+
# Send shutdown sentinel so the worker can finish processing
379378
try:
380379
_async_queue.put_nowait(None) # Shutdown signal
381380
except queue.Full:
382-
pass
383-
381+
# Fall back to blocking put to ensure the sentinel is enqueued
382+
_async_queue.put(None)
383+
384384
# Wait for worker to finish (with timeout)
385385
_async_worker.join(timeout=1.0)
386386
_async_worker = None

0 commit comments

Comments
 (0)