Skip to content

Conversation

@guocuimi
Copy link
Collaborator

@guocuimi guocuimi commented Aug 30, 2024

asyncio.Queue is not thread-safe, so we need to use loop.call_soon_threadsafe to schedule callbacks from other threads. This diff fix the potential contention issue.

Thanks @tp-nan for reporting the issue #323.

@guocuimi guocuimi requested review from liutongxuan and removed request for liutongxuan August 30, 2024 05:34
@guocuimi guocuimi self-assigned this Aug 30, 2024
@guocuimi guocuimi merged commit bb739f6 into main Aug 30, 2024
@guocuimi guocuimi deleted the thread_safe branch August 30, 2024 05:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants