PEP 466: another counter-argument for open(blocking=True)
This commit is contained in:
parent
0c8a96692c
commit
f6bac4e607
|
@ -199,6 +199,12 @@ operating system. If a platform does not support a function, the
|
||||||
function should not be available on the platform. For example,
|
function should not be available on the platform. For example,
|
||||||
the ``os.fork()`` function is not available on Windows.
|
the ``os.fork()`` function is not available on Windows.
|
||||||
|
|
||||||
|
UNIX has more flag on file descriptors: ``O_DSYNC``, ``O_SYNC``,
|
||||||
|
``O_DIRECT``, etc. Adding all these flags complicates the signature and
|
||||||
|
the implementation of functions creating file descriptor like open().
|
||||||
|
Moreover, these flags do not work on any file type, and are not
|
||||||
|
portable.
|
||||||
|
|
||||||
For all these reasons, this alternative was rejected. The PEP 3156
|
For all these reasons, this alternative was rejected. The PEP 3156
|
||||||
proposes an abstraction for asynchronous I/O supporting non-blocking
|
proposes an abstraction for asynchronous I/O supporting non-blocking
|
||||||
files on Windows.
|
files on Windows.
|
||||||
|
|
Loading…
Reference in New Issue