Order is nondeterministic with multiprocessing and piped output
Steps to reproduce:
- In a directory, create two files a.py and b.py with an error each (eg. both containing a=1).
- From the directory, run
flake8 -j2 . | tee
multiple times (for i in `seq 1 10` ; do flake8 -j2 . | tee; echo; done
can be useful).
Expected result:
The order is always the same, eg. a.py
, then b.py
. This is the case with pep8
and flake8 -j1
, or when the output is not piped. (By the way, I originally hit the error with watch
, not tee
).
Actual result:
The order is nondeterministic: sometimes a.py
is first, sometimes b.py
is first instead.