[stream-refactor] replace old detach_popen() reference

This commit is contained in:
David Wilson 2019-07-23 14:07:00 +01:00
parent 300f8b2ff9
commit 1aceacf89e
2 changed files with 5 additions and 5 deletions

View File

@ -177,9 +177,9 @@ class FixedPolicy(Policy):
cores, before reusing the second hyperthread of an existing core.
A hook is installed that causes :meth:`reset` to run in the child of any
process created with :func:`mitogen.parent.detach_popen`, ensuring
CPU-intensive children like SSH are not forced to share the same core as
the (otherwise potentially very busy) parent.
process created with :func:`mitogen.parent.popen`, ensuring CPU-intensive
children like SSH are not forced to share the same core as the (otherwise
potentially very busy) parent.
"""
def __init__(self, cpu_count=None):
#: For tests.

View File

@ -199,10 +199,10 @@ class LinuxPolicyTest(testlib.TestCase):
self.policy._set_cpu(3)
my_cpu = self._get_cpus()
pid = mitogen.parent.detach_popen(
proc = mitogen.parent.popen(
args=['cp', '/proc/self/status', tf.name]
)
os.waitpid(pid, 0)
proc.wait()
his_cpu = self._get_cpus(tf.name)
self.assertNotEquals(my_cpu, his_cpu)