New submission from juj:

When Multiprocessing.Pool.map is used for a script that registers atexit 
handlers, the atexit handlers are not executed when the pool threads quit.

STR:

1. Run attached file in Python 2.7 with 'python task_spawn.py'
2. Observe the printed output.

Observed:

Console prints:

CREATED TEMP DIRECTORY c:\users\clb\appdata\local\temp\temp_qef8r_
CREATED TEMP DIRECTORY c:\users\clb\appdata\local\temp\temp_axi9tt
CREATED TEMP DIRECTORY c:\users\clb\appdata\local\temp\temp_vx6fmu
task1
task2
ATEXIT: REMOVING TEMP DIRECTORY c:\users\clb\appdata\local\temp\temp_qef8r_

Expected:

Console should print:

CREATED TEMP DIRECTORY c:\users\clb\appdata\local\temp\temp_qef8r_
CREATED TEMP DIRECTORY c:\users\clb\appdata\local\temp\temp_axi9tt
CREATED TEMP DIRECTORY c:\users\clb\appdata\local\temp\temp_vx6fmu
task1
task2
ATEXIT: REMOVING TEMP DIRECTORY c:\users\clb\appdata\local\temp\temp_vx6fmu
ATEXIT: REMOVING TEMP DIRECTORY c:\users\clb\appdata\local\temp\temp_axi9tt
ATEXIT: REMOVING TEMP DIRECTORY c:\users\clb\appdata\local\temp\temp_qef8r_

----------
components: Library (Lib)
files: task_spawn.py
messages: 236273
nosy: juj
priority: normal
severity: normal
status: open
title: atexit handlers are not executed when using multiprocessing.Pool.map.
type: behavior
versions: Python 2.7
Added file: http://bugs.python.org/file38185/task_spawn.py

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue23489>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to