[issue37294] concurrent.futures.ProcessPoolExecutor and multiprocessing.pool.Pool fail with super
Géry
report at bugs.python.org
Sat Jun 15 18:21:15 EDT 2019
Géry <gery.ogam at gmail.com> added the comment:
And like the `concurrent.futures` module for `concurrent.futures.ProcessPoolExecutor` but not for `concurrent.futures.ThreadPoolExecutor` (see above), the `multiprocessing.pool` module seems also affected by a similar problem for `multiprocessing.pool.Pool` (process pools) but not for `multiprocessing.pool.ThreadPool` (thread pools).
Indeed the following code:
import multiprocessing.pool
class A:
def f(self):
print("called")
class B(A):
def f(self):
pool = multiprocessing.pool.Pool(2)
pool.apply(super().f)
if __name__ == "__main__":
B().f()
raises the following exception:
> AssertionError: daemonic processes are not allowed to have children
----------
title: ProcessPoolExecutor fails with super -> concurrent.futures.ProcessPoolExecutor and multiprocessing.pool.Pool fail with super
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37294>
_______________________________________
More information about the Python-bugs-list
mailing list