Skip to content
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

asyncio周り修正 #4142

Merged
merged 3 commits into from
Jul 8, 2024
Merged

asyncio周り修正 #4142

merged 3 commits into from
Jul 8, 2024

Conversation

massongit
Copy link
Member

https://docs.python.org/ja/3/library/asyncio-eventloop.html

アプリケーション開発者は通常 asyncio.run() のような高水準の ayncio 関数だけを利用し、ループオブジェクトを参照したり、ループオブジェクトのメソッドを呼び出したりすることはほとんどありません。

とのことなので、 asyncio.get_event_loop().run_until_complete の代わりに asyncio.run を使います。

また、非同期な関数内では time.sleep の代わりに asyncio.sleep を使います。

@massongit massongit requested review from Goryudyuma and nakkaa July 5, 2024 14:15
@massongit massongit enabled auto-merge July 7, 2024 23:53
@massongit massongit merged commit b96e7e2 into develop Jul 8, 2024
39 checks passed
@massongit massongit deleted the fix_asyncio branch July 8, 2024 06:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants