RealtimeSTT icon indicating copy to clipboard operation
RealtimeSTT copied to clipboard

prevent shutdown from hanging on Windows

Open JayDeezus opened this issue 1 year ago • 2 comments

on my system (Windows) queue.get() with no arguments will just hang during shutdown. I'm attempting to preserve the blocking behavior of audio_queue.get() with arguments True and 1.

  • True - the call still blocks, preserving your existing behavior
  • 1 - blocks for at most 1 second

See https://docs.python.org/3/library/queue.html#queue.Queue.get for details. Specifically:

""" Prior to 3.0 on POSIX systems, and for all versions on Windows, if block is true and timeout is None, this operation goes into an uninterruptible wait on an underlying lock. This means that no exceptions can occur, and in particular a SIGINT will not trigger a KeyboardInterrupt. """

JayDeezus avatar Aug 20 '24 00:08 JayDeezus