diff options
author | Olivier Wilkinson (reivilibre) <oliverw@matrix.org> | 2022-10-07 15:16:05 +0100 |
---|---|---|
committer | Olivier Wilkinson (reivilibre) <oliverw@matrix.org> | 2022-10-07 15:16:05 +0100 |
commit | 8de5c59fd3663fa55d0a6a939f35f6de0fc8bf01 (patch) | |
tree | c213e8b1c16334ba310d1b9e50f1625197303aca /synapse | |
parent | Bump msgpack from 1.0.3 to 1.0.4 (#14040) (diff) | |
download | synapse-8de5c59fd3663fa55d0a6a939f35f6de0fc8bf01.tar.xz |
Use uvloop as an asyncio reactor event loop
Diffstat (limited to 'synapse')
-rw-r--r-- | synapse/__init__.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/synapse/__init__.py b/synapse/__init__.py index 1bed6393bd..7bb07cfd05 100644 --- a/synapse/__init__.py +++ b/synapse/__init__.py @@ -44,6 +44,12 @@ if bool(os.environ.get("SYNAPSE_ASYNC_IO_REACTOR", False)): from twisted.internet import asyncioreactor + if bool(os.environ.get("SYNAPSE_UVLOOP", False)): + import uvloop + + uvloop.install() + print("Using uvloop") + asyncioreactor.install(asyncio.get_event_loop()) except ImportError: pass |