GitHubRGI / geopackage-python

Achived - See GitLab repository for current development
https://gitlab.com/GitLabRGI/erdc/geopackage-python
GNU General Public License v3.0
65 stars 42 forks source link

gdal2tiles_parallel.py: script does not exit cleanly during multiprocessing #4

Open stevendlander opened 9 years ago

stevendlander commented 9 years ago

Since gdal2tiles_parallel.py script utilizes multiprocessing, it does not exit cleanly when interrupted. For example, if Ctrl+D (KeyboardInterrupt) while the script is executing, it will not completely stop but instead produce profuse error messages. To kill the process, close the terminal windows on Windows or, on Linux, send the process to the background (Ctrl+Z) then kill the job with kill -9 $(jobs -p).

The correct approach to handle exiting the script during a tile job would be to send a killall signal to all running processes and exit cleanly.

stevendlander commented 8 years ago

http://stackoverflow.com/questions/1231599/python-multiprocessing-exit-elegantly-how

Refactor multiprocessing to a class-based solution should allow for clean exits.