mirror of
https://github.com/zhaarey/AppleMusicDecrypt.git
synced 2025-10-23 15:11:06 +00:00
feat: use uvloop or winloop to speed up asyncio
This commit is contained in:
7
main.py
7
main.py
@@ -1,8 +1,15 @@
|
||||
import asyncio
|
||||
import sys
|
||||
|
||||
from src.cmd import NewInteractiveShell
|
||||
|
||||
if __name__ == '__main__':
|
||||
if sys.platform in ('win32', 'cygwin', 'cli'):
|
||||
import winloop
|
||||
winloop.install()
|
||||
else:
|
||||
import uvloop
|
||||
uvloop.install()
|
||||
loop = asyncio.get_event_loop()
|
||||
cmd = NewInteractiveShell(loop)
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user