Can ray.util.queue.Empty extend queue.Empty? #50154
Labels
core
Issues that should be addressed in Ray Core
enhancement
Request for new feature and/or capability
good-first-issue
Great starter issue for someone just starting to contribute to Ray
jira-core
P2
Important issue, but not time-critical
Description
I am trying to catch Empty queue exceptions where my queue can either be a multiprocess queue or ray.util.queue. Currently, I have to do this:
because ray.util.queue.Empty is not a subclass of Python's built-in queue.Empty but rather Python's built-in Exception class. See:
ray/python/ray/util/queue.py
Line 10 in 3c47c39
A quick fix would be to just change it to extend queue.Empty, and while at it, also change Full to extend queue.Full too?
I think this would be a good first issue. Thanks!
Use case
Code conciseness for Ray users
The text was updated successfully, but these errors were encountered: