_Capture.read polls read_available against the stop event before every InputStream.read, close() aborts before closing, and _halt_thread joins outside the detector lock and keeps the handle while the thread is alive. Fixes #117096