1

From Is subprocess.Popen not thread safe? it's clear that prior to 3.2, subprocess.Popen() had serious threading issues, and 3.2 improved the situation significantly. However, AFAICT the Python documents do not state one way or the other whether subprocess is currently thread safe or not. I'd like to chuck some Popen() invocations on a ThreadPoolExecutor (for executing shell commands which I need to send stdin to), but not if there's any potential for nasty concurrency surprises in doing so.

Is subprocess.Popen() thread safe now, or is it still appreciably dangerous?

cbmanica
  • 3,502
  • 7
  • 36
  • 54

0 Answers0