-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
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
RuntimeError: deque mutated during iteration #275
Comments
@mborsetti thanks for reporting this. I don't see an issue here directly, but there might be a deeply hidden issue. |
@Kriechi Thanks for your reply. I am not familiar with the architecture so only reported it here; I will cross-report to httpx next. |
Cross-posted at encode/httpx#3279 |
So apparently this is a thread-safety issue: ros-visualization/rqt_robot_monitor#6 @Kriechi we can consider adding a lock into the |
@BYK not sure how a issue from 2018 related to hpack here. |
@Kriechi well here's the break down (I think it is mostly
Proposal:
Makes sense? |
Maybe I'm misreading the reported error here, but it seems to me that httpx uses a connection pool with asyncio / concurrent futures. Citing from the h2 README - highlight my own:
If a consumer of the h2 and hpack libraries decides to implement multi-threading or concurrency as part of their application, it is their responsibility to ensure proper locking of the h2/hpack resources. Accessing h2 Connection or Stream objects from two different threads concurrently without safe guards is not supported - as stated in the h2 README. So the intended and correct way of using the h2 API would be, for example, to use a mutex to protect/lock the entire h2 connection and stream state, before calling any API such as Regarding your proposal of using per-stream Encoder/Decoder instances: My understanding of this section in the HTTP/2 RFC is that this would not be a valid solution:
|
Not familiar with this package, but I ended up with this RuntimeError from an
httpx
get
.The text was updated successfully, but these errors were encountered: