<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/python-packages/trollius.git/overlapped.c, branch remove-joinable-queue</title>
<subtitle>bitbucket.org: Obsolete (use python-packages/trollius-git)
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/trollius.git/'/>
<entry>
<title>Tulip issue #204: Fix IocpProactor.accept_pipe()</title>
<updated>2015-01-22T22:35:14+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>victor.stinner@gmail.com</email>
</author>
<published>2015-01-22T22:35:14+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/trollius.git/commit/?id=5570ba2a0975c69dab2865345b70485755d93866'/>
<id>5570ba2a0975c69dab2865345b70485755d93866</id>
<content type='text'>
Overlapped.ConnectNamedPipe() now returns a boolean: True if the pipe is
connected (if ConnectNamedPipe() failed with ERROR_PIPE_CONNECTED), False if
the connection is in progress.

This change removes multiple hacks in IocpProactor.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Overlapped.ConnectNamedPipe() now returns a boolean: True if the pipe is
connected (if ConnectNamedPipe() failed with ERROR_PIPE_CONNECTED), False if
the connection is in progress.

This change removes multiple hacks in IocpProactor.
</pre>
</div>
</content>
</entry>
<entry>
<title>Python issue #23293: Rewrite IocpProactor.connect_pipe()</title>
<updated>2015-01-22T08:44:29+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>victor.stinner@gmail.com</email>
</author>
<published>2015-01-22T08:44:29+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/trollius.git/commit/?id=478a5878664c6b9a274616b4d7970fd3532ffa96'/>
<id>478a5878664c6b9a274616b4d7970fd3532ffa96</id>
<content type='text'>
Add _overlapped.ConnectPipe() which tries to connect to the pipe for
asynchronous I/O (overlapped): call CreateFile() in a loop until it doesn't
fail with ERROR_PIPE_BUSY. Use an increasing delay between 1 ms and 100 ms.

Remove Overlapped.WaitNamedPipeAndConnect() which is no more used.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add _overlapped.ConnectPipe() which tries to connect to the pipe for
asynchronous I/O (overlapped): call CreateFile() in a loop until it doesn't
fail with ERROR_PIPE_BUSY. Use an increasing delay between 1 ms and 100 ms.

Remove Overlapped.WaitNamedPipeAndConnect() which is no more used.
</pre>
</div>
</content>
</entry>
<entry>
<title>Python issue #23095: Rewrite _WaitHandleFuture.cancel()</title>
<updated>2015-01-21T21:40:49+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>victor.stinner@gmail.com</email>
</author>
<published>2015-01-21T21:40:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/trollius.git/commit/?id=71e2009f93876c897798d59703257a50caff8af6'/>
<id>71e2009f93876c897798d59703257a50caff8af6</id>
<content type='text'>
This change fixes a race conditon related to _WaitHandleFuture.cancel() leading
to Python crash or "GetQueuedCompletionStatus() returned an unexpected event"
logs. Before, the overlapped object was destroyed too early, it was possible
that the wait completed whereas the overlapped object was already destroyed.
Sometimes, a different overlapped was allocated at the same address, leading to
unexpected completition.

_WaitHandleFuture.cancel() now waits until the wait is cancelled to clear its
reference to the overlapped object. To wait until the cancellation is done,
UnregisterWaitEx() is used with an event instead of UnregisterWait().

To wait for this event, a new _WaitCancelFuture class was added. It's a
simplified version of _WaitCancelFuture. For example, its cancel() method calls
UnregisterWait(), not UnregisterWaitEx(). _WaitCancelFuture should not be
cancelled.

The overlapped object is kept alive in _WaitHandleFuture until the wait is
unregistered.

Other changes:

* Add _overlapped.UnregisterWaitEx()
* Remove fast-path in IocpProactor.wait_for_handle() to immediatly set the
  result if the wait already completed. I'm not sure that it's safe to
  call immediatly UnregisterWaitEx() before the completion was signaled.
* Add IocpProactor._unregistered() to forget an overlapped which may never be
  signaled, but may be signaled for the next loop iteration. It avoids to
  block forever IocpProactor.close() if a wait was cancelled, and it may also
  avoid some "... unexpected event ..." warnings.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This change fixes a race conditon related to _WaitHandleFuture.cancel() leading
to Python crash or "GetQueuedCompletionStatus() returned an unexpected event"
logs. Before, the overlapped object was destroyed too early, it was possible
that the wait completed whereas the overlapped object was already destroyed.
Sometimes, a different overlapped was allocated at the same address, leading to
unexpected completition.

_WaitHandleFuture.cancel() now waits until the wait is cancelled to clear its
reference to the overlapped object. To wait until the cancellation is done,
UnregisterWaitEx() is used with an event instead of UnregisterWait().

To wait for this event, a new _WaitCancelFuture class was added. It's a
simplified version of _WaitCancelFuture. For example, its cancel() method calls
UnregisterWait(), not UnregisterWaitEx(). _WaitCancelFuture should not be
cancelled.

The overlapped object is kept alive in _WaitHandleFuture until the wait is
unregistered.

Other changes:

* Add _overlapped.UnregisterWaitEx()
* Remove fast-path in IocpProactor.wait_for_handle() to immediatly set the
  result if the wait already completed. I'm not sure that it's safe to
  call immediatly UnregisterWaitEx() before the completion was signaled.
* Add IocpProactor._unregistered() to forget an overlapped which may never be
  signaled, but may be signaled for the next loop iteration. It avoids to
  block forever IocpProactor.close() if a wait was cancelled, and it may also
  avoid some "... unexpected event ..." warnings.
</pre>
</div>
</content>
</entry>
<entry>
<title>overlapped.c: Fix usage of the union</title>
<updated>2014-01-30T14:11:54+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>victor.stinner@gmail.com</email>
</author>
<published>2014-01-30T14:11:54+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/trollius.git/commit/?id=54f64b811c5d21826211e3f43f5711b11412a87b'/>
<id>54f64b811c5d21826211e3f43f5711b11412a87b</id>
<content type='text'>
* read_buffer can only be used for TYPE_READ and TYPE_ACCEPT types
* write_buffer can only be used for TYPE_WRITE type
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* read_buffer can only be used for TYPE_READ and TYPE_ACCEPT types
* write_buffer can only be used for TYPE_WRITE type
</pre>
</div>
</content>
</entry>
<entry>
<title>Make the IOCP proactor support "waitable" handles.</title>
<updated>2013-10-25T18:06:41+00:00</updated>
<author>
<name>Richard Oudkerk</name>
<email>shibturn@gmail.com</email>
</author>
<published>2013-10-25T18:06:41+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/trollius.git/commit/?id=028dbeb01eb14780aa09e8d6aaf981192c347403'/>
<id>028dbeb01eb14780aa09e8d6aaf981192c347403</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Make BindLocal() take an argument for the family of the socket.</title>
<updated>2013-10-15T21:22:00+00:00</updated>
<author>
<name>Richard Oudkerk</name>
<email>shibturn@gmail.com</email>
</author>
<published>2013-10-15T21:22:00+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/trollius.git/commit/?id=014f2a4de61ca24c0fb2ffed333f96b1a61d01c2'/>
<id>014f2a4de61ca24c0fb2ffed333f96b1a61d01c2</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fixes to make iocp loop handle ERROR_NETNAME_DELETED</title>
<updated>2013-10-11T13:35:02+00:00</updated>
<author>
<name>Richard Oudkerk</name>
<email>shibturn@gmail.com</email>
</author>
<published>2013-10-11T13:35:02+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/trollius.git/commit/?id=365a7294ef97a4e0b1fd7f6d137a862396ab4802'/>
<id>365a7294ef97a4e0b1fd7f6d137a862396ab4802</id>
<content type='text'>
and make sink.py/source.py run with iocp.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
and make sink.py/source.py run with iocp.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add support for Windows named pipes.</title>
<updated>2013-10-05T13:55:49+00:00</updated>
<author>
<name>Richard Oudkerk</name>
<email>shibturn@gmail.com</email>
</author>
<published>2013-10-05T13:55:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/trollius.git/commit/?id=ef663902347f4b11e93565f34cd031783ef5ccd1'/>
<id>ef663902347f4b11e93565f34cd031783ef5ccd1</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Correct handling of EOF for Overlapped.ReadFile().</title>
<updated>2013-05-17T15:40:19+00:00</updated>
<author>
<name>Richard Oudkerk</name>
<email>shibturn@gmail.com</email>
</author>
<published>2013-05-17T15:40:19+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/trollius.git/commit/?id=3f87ec3dab3cd3f960e9cfa13c6c77050c58068b'/>
<id>3f87ec3dab3cd3f960e9cfa13c6c77050c58068b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Stop exposing SetFileCompletionNotificationModes() in _overlapped</title>
<updated>2013-02-07T16:00:14+00:00</updated>
<author>
<name>Richard Oudkerk</name>
<email>shibturn@gmail.com</email>
</author>
<published>2013-02-07T16:00:14+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/trollius.git/commit/?id=8e7fc0eea10922f92696bb4824e8ead5715b4a6c'/>
<id>8e7fc0eea10922f92696bb4824e8ead5715b4a6c</id>
<content type='text'>
since it is not currently used by tulip, and is not WinXP compatible.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
since it is not currently used by tulip, and is not WinXP compatible.
</pre>
</div>
</content>
</entry>
</feed>
