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

Commit

Permalink
Support running synmark on macOS. (#8578)
Browse files Browse the repository at this point in the history
By using the "poll" reactor since macOS doesn't support epoll.
  • Loading branch information
clokep committed Oct 19, 2020
1 parent 1fcdbeb commit 85c5644
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions changelog.d/8578.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Support macOS on the `synmark` benchmark runner.
7 changes: 5 additions & 2 deletions synmark/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"]
Expand Down

0 comments on commit 85c5644

Please sign in to comment.