Ma77Ball opened a new pull request, #5326:
URL: https://github.com/apache/texera/pull/5326

   ### What changes were proposed in this PR?
   - Added a `threading.Event` stop flag to `StoppableQueueBlockingRunnable` so 
shutdown no longer depends solely on the `RUNNABLE_STOP` marker: `stop()` sets 
the flag and enqueues the marker, and `interruptible_get` blocks on 
`get(timeout=STOP_POLL_INTERVAL)`, treating a `queue.Empty` timeout as a cue to 
re-check the flag and exit.
   - Plumbed an optional `timeout` through `Getable.get`, `InternalQueue.get`, 
and `LinkedBlockingMultiQueue.get` (via `Condition.wait_for`). The default 
`timeout=None` keeps the existing blocking behavior unchanged, so only the 
stoppable threads opt into polling and the tuple data path is untouched.
   - Without this, a missed wakeup or an out-of-band stop left a `MainLoop`, 
`NetworkSender`, or `PortStorageWriter` thread parked forever, hanging the 
worker's `thread.join()` on shutdown.
   ### Any related issues, documentation, or discussions?
   Closes: #5325
   ### How was this PR tested?
   - Added `test_stoppable_queue_blocking_thread.py`: items reach `receive()` 
and `stop()` ends `run()`, and setting only the stop flag (no marker) still 
terminates `run()`, proving the timeout recheck.
   - Added 3 timeout cases to `test_linked_blocking_multi_queue.py` (raises 
`Empty` on expiry, returns an available item, returns an item arriving 
mid-wait); the file is 17 passing tests.
   ### Was this PR authored or co-authored using generative AI tooling?
   Co-authored with Claude Opus 4.7 in compliance with ASF
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to