feat: use uvloop or winloop to speed up asyncio

with_status
WorldObservationLog 4 months ago
parent cc65d4782a
commit 557a1f7ea8
  1. 7
      main.py
  2. 1772
      poetry.lock
  3. 3
      pyproject.toml

@ -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:

1772
poetry.lock generated

File diff suppressed because it is too large Load Diff

@ -22,6 +22,9 @@ tenacity = "^8.2.3"
prompt-toolkit = "^3.0.43"
mitmproxy = "^10.3.0"
async-lru = "^2.0.4"
winloop = {version = "^0.1.3", platform = "win32"}
uvloop = [{version = "^0.19.0", platform = "linux"},
{version = "^0.19.0", platform = "darwin"}]
[build-system]
requires = ["poetry-core"]

Loading…
Cancel
Save