Steven D'Aprano <[email protected]> added the comment:
I'm sorry, but perhaps I may have missed something here. The behaviour you show
is what I would expect. In fact, I would expect that any two runs of your code
will likely produce different output, even on the same machine using the same
OS. I just ran it twice in Python 3.5 and got different results on the same
machine:
Run 1 Run 2
x = 1 x = 1
x = 2 x = 2
x = 3 x = 3
x = 4 x = 4
y = 5 y = 5
x = 5 x = 5
x = 6 x = 6
x = 7 x = 7
x = 8 y = 8
y = 9 x = 8
x = 9 x = 9
You are running code concurrently in multiple processes. The order that the
results are printed is unpredictable and will depend on many factors, including
the OS.
Can you give any reasons why you consider this is to be a bug rather than
normal behaviour?
I'm not going to close this as "Not a bug", since I'm not a multiprocessing
expert and I may have misunderstood something, but it looks to me like normal
behaviour when using threading or multiprocessing.
----------
nosy: +steven.daprano
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue39255>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com