Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Try using uvloop with asyncio
Browse files Browse the repository at this point in the history
  • Loading branch information
erikjohnston committed Dec 4, 2023
1 parent be3ec4d commit da78e0b
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 2 deletions.
48 changes: 46 additions & 2 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,8 @@ pydantic = ">=1.7.4, <3"
# needed.
setuptools_rust = ">=1.3"

uvloop = ">=0.19.0"


# Optional Dependencies
# ---------------------
Expand Down
4 changes: 4 additions & 0 deletions synapse/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@

import asyncio

import uvloop

asyncio.set_event_loop_policy(uvloop.EventLoopPolicy())

from twisted.internet import asyncioreactor

asyncioreactor.install(asyncio.get_event_loop())
Expand Down

0 comments on commit da78e0b

Please sign in to comment.