mirror of
https://mau.dev/maunium/synapse.git
synced 2024-10-01 01:36:05 -04:00
Support running synmark on macOS. (#8578)
By using the "poll" reactor since macOS doesn't support epoll.
This commit is contained in:
parent
1fcdbeb3ab
commit
85c56445fb
1
changelog.d/8578.misc
Normal file
1
changelog.d/8578.misc
Normal file
@ -0,0 +1 @@
|
||||
Support macOS on the `synmark` benchmark runner.
|
@ -15,7 +15,10 @@
|
||||
|
||||
import sys
|
||||
|
||||
from twisted.internet import epollreactor
|
||||
try:
|
||||
from twisted.internet.epollreactor import EPollReactor as Reactor
|
||||
except ImportError:
|
||||
from twisted.internet.pollreactor import PollReactor as Reactor
|
||||
from twisted.internet.main import installReactor
|
||||
|
||||
from synapse.config.homeserver import HomeServerConfig
|
||||
@ -63,7 +66,7 @@ def make_reactor():
|
||||
Instantiate and install a Twisted reactor suitable for testing (i.e. not the
|
||||
default global one).
|
||||
"""
|
||||
reactor = epollreactor.EPollReactor()
|
||||
reactor = Reactor()
|
||||
|
||||
if "twisted.internet.reactor" in sys.modules:
|
||||
del sys.modules["twisted.internet.reactor"]
|
||||
|
Loading…
Reference in New Issue
Block a user