[CalendarServer-changes] [15575] CalendarServer/trunk/contrib/performance/loadtest/sim.py

source_changes at macosforge.org source_changes at macosforge.org
Mon May 9 10:32:14 PDT 2016


Revision: 15575
          http://trac.calendarserver.org//changeset/15575
Author:   sagen at apple.com
Date:     2016-05-09 10:32:14 -0700 (Mon, 09 May 2016)
Log Message:
-----------
Use epoll if kqueue not available

Modified Paths:
--------------
    CalendarServer/trunk/contrib/performance/loadtest/sim.py

Modified: CalendarServer/trunk/contrib/performance/loadtest/sim.py
===================================================================
--- CalendarServer/trunk/contrib/performance/loadtest/sim.py	2016-05-05 18:57:59 UTC (rev 15574)
+++ CalendarServer/trunk/contrib/performance/loadtest/sim.py	2016-05-09 17:32:14 UTC (rev 15575)
@@ -20,8 +20,12 @@
 import sys
 
 if "twisted.internet.reactor" not in sys.modules:
-    from twisted.internet import kqreactor
-    kqreactor.install()
+    try:
+        from twisted.internet import kqreactor
+        kqreactor.install()
+    except ImportError:
+        from twisted.internet import epollreactor
+        epollreactor.install()
 
 from collections import namedtuple, defaultdict
 from os import environ, mkdir
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20160509/d5245880/attachment.html>


More information about the calendarserver-changes mailing list