Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nested p_map causing AssertionError in thread pool #20

Open
BenBE opened this issue Apr 20, 2020 · 1 comment
Open

Nested p_map causing AssertionError in thread pool #20

BenBE opened this issue Apr 20, 2020 · 1 comment

Comments

@BenBE
Copy link

BenBE commented Apr 20, 2020

Trying to nest p_map (e.g. to implement generating a square matrix) causes Python to barf out with a failed assertion.

Steps to reproduce:

from functools import partial

l = [1, 2, 3]

def add(a, b):
    return a + b

def gen_mat(x):
    nonlocal l
    return p_map(partial(add, x), l)

mat = p_map(gen_mat, l)
print(mat)

Expected Result:

[[2,3,4],[3,4,5],[4,5,6]]

Actual Result:

AssertionError: daemonic processes are not allowed to have children
@Irazall
Copy link

Irazall commented Jun 9, 2020

same here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants