Skip to content

把 threading 相关代码改成 asyncio 的形式 #501

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

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

fangjf
Copy link

@fangjf fangjf commented Mar 24, 2025

python 在版本 3.13 之前,由于 GIL 的存在,thread 并不能真正地多线程同时执行,只是一个异步的解决手段,还会消耗系统线程,可以把代码(主要是connection.py)中涉及到的 threading 代码换成 asyncio 形式,这样不仅代码统一,还会减少资源的消耗。

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.

1 participant