python / cpython

The Python programming language
https://www.python.org
Other
62.21k stars 29.89k forks source link

input() call blocks multiprocessing #71070

Open 1b50998b-27ec-42a4-af06-fb696da97272 opened 8 years ago

1b50998b-27ec-42a4-af06-fb696da97272 commented 8 years ago
BPO 26883
Nosy @pfmoore, @tjguk, @zware, @zooba

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields: ```python assignee = None closed_at = None created_at = labels = ['type-bug', 'OS-windows'] title = 'input() call blocks multiprocessing' updated_at = user = 'https://bugs.python.org/the' ``` bugs.python.org fields: ```python activity = actor = 'the' assignee = 'none' closed = False closed_date = None closer = None components = ['Windows'] creation = creator = 'the' dependencies = [] files = [] hgrepos = [] issue_num = 26883 keywords = [] message_count = 1.0 messages = ['264480'] nosy_count = 5.0 nosy_names = ['paul.moore', 'tim.golden', 'zach.ware', 'steve.dower', 'the'] pr_nums = [] priority = 'normal' resolution = None stage = None status = 'open' superseder = None type = 'behavior' url = 'https://bugs.python.org/issue26883' versions = ['Python 3.4', 'Python 3.5'] ```

1b50998b-27ec-42a4-af06-fb696da97272 commented 8 years ago

If input is called right away after applying a single job to multiprocessing.Pool or submitting concurrent.futures.ProcessPoolExecutor then the processes are not started. If multiple jobs are submitted everything works fine.

This only seems to be a problem on Windows (probably only 10) and python version 3.x

See my stackoverflow question: http://stackoverflow.com/questions/36919678/python-multiprocessing-pool-does-not-start-right-away