Skip to content

test hangs when using multiprocessing.Pool #5429

@nnop

Description

@nnop
from multiprocessing import Pool

def test_foo():
    pool = Pool(4)
    assert pool.map(lambda x: x*2, [1, 2, 3, 4]) == [2, 4, 6, 8]

This is a minimal example. The test hangs when using Pool.

Dosn't pytest support Pool?

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: needs informationreporter needs to provide more information; can be closed after 2 or more weeks of inactivitytype: questiongeneral question, might be closed after 2 weeks of inactivity

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions