Géry <gery.o...@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 <rep...@bugs.python.org>
<https://bugs.python.org/issue37294>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to