Pythonic concurrency - offtopic

Offtopic: Microsoft Windows [Version 5.2.3790] (C) Copyright 1985-2003 Microsoft Corp. G:\Working\1>c:\Python24\python Python 2.4.1 (#65, Mar 30 2005, 09:13:57) [MSC v.1310 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information.
from os import fork Traceback (most recent call last): File "<stdin>", line 1, in ? ImportError: cannot import name fork

Sokolov Yura <falcon@intercable.ru> wrote:
Offtopic:
Microsoft Windows [Version 5.2.3790] (C) Copyright 1985-2003 Microsoft Corp.
G:\Working\1>c:\Python24\python Python 2.4.1 (#65, Mar 30 2005, 09:13:57) [MSC v.1310 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information.
from os import fork Traceback (most recent call last): File "<stdin>", line 1, in ? ImportError: cannot import name fork
Python for Windows, if I remember correctly, has never supported forking. This is because the underlying process execution code does not have support for the standard copy-on-write semantic which makes unix fork fast. Cygwin Python does support fork, but I believe this is through a literal copying of the memory space, which is far slower than unix fork. Until Microsoft adds kernel support for fork, don't expect standard Windows Python to support it. - Josiah

Josiah Carlson wrote:
Sokolov Yura <falcon@intercable.ru> wrote:
Offtopic:
Microsoft Windows [Version 5.2.3790] (C) Copyright 1985-2003 Microsoft Corp.
G:\Working\1>c:\Python24\python Python 2.4.1 (#65, Mar 30 2005, 09:13:57) [MSC v.1310 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information.
from os import fork Traceback (most recent call last): File "<stdin>", line 1, in ? ImportError: cannot import name fork
Python for Windows, if I remember correctly, has never supported forking. This is because the underlying process execution code does not have support for the standard copy-on-write semantic which makes unix fork fast.
Cygwin Python does support fork, but I believe this is through a literal copying of the memory space, which is far slower than unix fork.
Until Microsoft adds kernel support for fork, don't expect standard Windows Python to support it.
- Josiah
That is what i mean... sorry for being noisy...

On 10/14/05, Josiah Carlson <jcarlson@uci.edu> wrote:
Until Microsoft adds kernel support for fork, don't expect standard Windows Python to support it.
AFAIK the NT kernel has support for fork, but the Win32 subsystem doesn't support it (you can only use it with the POSIX subsystem). -- JanC

JanC <janc13@gmail.com> wrote:
On 10/14/05, Josiah Carlson <jcarlson@uci.edu> wrote:
Until Microsoft adds kernel support for fork, don't expect standard Windows Python to support it.
AFAIK the NT kernel has support for fork, but the Win32 subsystem doesn't support it (you can only use it with the POSIX subsystem).
Good to know. But if I remember subsystem semantics properly, you can use a single subsystem at any time, so if one wanted to use fork from the POSIX subsystem, one would necessarily have to massage the rest of Python into NT's POSIX subsystem, which could be a problem because NT/2K's posix subsystem doesn't support network interfaces, memory mapped files, ... http://msdn2.microsoft.com/en-us/library/y23kc048 Based on this page: http://www.cygwin.com/cygwin-ug-net/highlights.html ...it does seem possible to borrow cygwin's implementation of fork for use on win32, but I would guess that most people would be disappointed with its performance in comparison to unix fork. - Josiah
participants (3)
-
JanC
-
Josiah Carlson
-
Sokolov Yura