[issue39255] Windows and Unix run-time differences

2020-01-08 Thread Kallah


New submission from Kallah :

In the attached sync.py, running it on windows and Unix (Ubuntu and OSX tested) 
will grant different results. On windows it will output:
x = 1
x = 2
x = 3
y = 1
x = 4
x = 5
x = 6
x = 7
y = 1
While on ubuntu it will output:
x = 1
x = 2
x = 3
y = 4
x = 4
x = 5
x = 6
x = 7
y = 8

--
components: Windows
files: sync.py
messages: 359569
nosy: Kallah, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Windows and Unix run-time differences
type: behavior
versions: Python 3.6
Added file: https://bugs.python.org/file48832/sync.py

___
Python tracker 
<https://bugs.python.org/issue39255>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39255] Windows and Unix run-time differences

2020-01-08 Thread Kallah


Kallah  added the comment:

The difference here is that on Windows y will never change, it will stay 1 
forever while on Unix systems y will increment. Having done a bit more research 
it seems this is due to the way multiprocessing works on Windows vs Unix 
systems. In unix systems the new thread is a fork of the parent while in 
Windows it is a whole new process built from scratch (if I am understanding it 
correctly). I am not going to close it as I am unsure if it is by design that 
Windows and Unix python acts differently.

--

___
Python tracker 
<https://bugs.python.org/issue39255>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com