Skip to content

Instantly share code, notes, and snippets.

@fengyuentau
Created February 4, 2020 21:47
Show Gist options
  • Save fengyuentau/10104c4412a8cc72792be2bea2998d78 to your computer and use it in GitHub Desktop.
Save fengyuentau/10104c4412a8cc72792be2bea2998d78 to your computer and use it in GitHub Desktop.
Failed to write any content to multiple files using the multiprocessing module from python3.4

Environment:

  • uname -a to check OS: Linux NAME 4.9.0-11-amd64 #1 SMP Debian 4.9.189-3+deb9u1 (2019-09-20) x86_64 GNU/Linux
  • Python version: Python 3.4.1 |Anaconda 2.1.0 (64-bit)| (default, Sep 10 2014, 17:10:18) (a 3rd party module requires py3.4)

Behaviour:

  • When trying to write logs in each process, e.g. one log file for each process, files can be created but no content is written.

Debug:

  • No expected errors in worker function
  • Failed to write even in single-processing or just call the function without multiprocessing module

Solution:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment