[New-bugs-announce] [issue25656] multiprocessing.dummy: pool.map hangs on empty list

Tomer report at bugs.python.org
Wed Nov 18 09:04:58 EST 2015

New submission from Tomer:

In multiprocessing.dummy module I noticed when you send a zero-length iterator to pool.map it hang forever,

Code example:

import urllib2 
from multiprocessing.dummy import Pool as ThreadPool

def start_multithreading_urlopen(threads_num):

    pool = ThreadPool(threads_num)
    results = pool.map(urllib2.urlopen, [])

    # hang here

    print results

I think it related to Issue6433 that was fixed on multiprocessing module with simple length check

components: Library (Lib)
messages: 254844
nosy: tomer70
priority: normal
severity: normal
status: open
title: multiprocessing.dummy: pool.map hangs on empty list
type: behavior
versions: Python 2.7

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list