We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Recently discover that it can call q.join() on a closed queue. And I notice the q.join() will block forever even after the queue being closed.
q.join()
It is better that it should check parent queue is closing or not, while q.join() calling or to be called.
The q.join() calls should raise RuntimeError, when q.join() calls on a closed queue or when closing a queue while q.join() is calling.
import janus async def join_after_closing(): q = jauns.Queue() await q.async_q.put("boo") q.close() await q.async_q.join() # blocks forever async def close_after_join(): q = jauns.Queue() await q.async_q.put("boo") task = janus.ensure_future(q.async_q.join()) await asyncio.sleep(1) # ensure the task is blocking q.close() await task # blocks forever too
The text was updated successfully, but these errors were encountered:
Agree. Would you provide a pull request with the fix?
Sorry, something went wrong.
@asvetlov Yes. I create a pull request to fix this. #295
Fixed by #295
No branches or pull requests
Recently discover that it can call
q.join()
on a closed queue. And I notice theq.join()
will block forever even after the queue being closed.It is better that it should check parent queue is closing or not, while
q.join()
calling or to be called.The
q.join()
calls should raise RuntimeError, whenq.join()
calls on a closed queue or when closing a queue whileq.join()
is calling.The text was updated successfully, but these errors were encountered: