Skip to content

Commit 619f4de

Browse files
committed
[linear2] merge fallout: restore optimization from #491 / 7b129e8
1 parent 5c39f58 commit 619f4de

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

ansible_mitogen/connection.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -405,15 +405,6 @@ def _connect_mitogen_doas(spec):
405405
}
406406

407407

408-
class Broker(mitogen.master.Broker):
409-
"""
410-
WorkerProcess maintains at most 2 file descriptors, therefore does not need
411-
the exuberant syscall expense of EpollPoller, so override it and restore
412-
the poll() poller.
413-
"""
414-
poller_class = mitogen.core.Poller
415-
416-
417408
class CallChain(mitogen.parent.CallChain):
418409
"""
419410
Extend :class:`mitogen.parent.CallChain` to additionally cause the

ansible_mitogen/process.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,15 @@ def get_cpu_count(default=None):
294294
return cpu_count
295295

296296

297+
class Broker(mitogen.master.Broker):
298+
"""
299+
WorkerProcess maintains at most 2 file descriptors, therefore does not need
300+
the exuberant syscall expense of EpollPoller, so override it and restore
301+
the poll() poller.
302+
"""
303+
poller_class = mitogen.core.Poller
304+
305+
297306
class Binding(object):
298307
"""
299308
Represent a bound connection for a particular inventory hostname. When
@@ -530,7 +539,7 @@ def get_binding(self, inventory_name):
530539
See WorkerModel.get_binding().
531540
"""
532541
if self.broker is None:
533-
self.broker = mitogen.master.Broker()
542+
self.broker = Broker()
534543

535544
path = self._listener_for_name(inventory_name)
536545
if path != self.listener_path:

0 commit comments

Comments
 (0)