<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/python-packages/trollius.git/asyncio, 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>Docstring for Queue.join shouldn't mention threads.</title>
<updated>2015-01-24T04:31:27+00:00</updated>
<author>
<name>A. Jesse Jiryu Davis</name>
<email>jesse@mongodb.com</email>
</author>
<published>2015-01-24T04:31:27+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/trollius.git/commit/?id=00ea053512919dd48ea196b27a9590e57fb7eb32'/>
<id>00ea053512919dd48ea196b27a9590e57fb7eb32</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Tulip issue #220: Merge JoinableQueue with Queue.</title>
<updated>2015-01-24T04:30:31+00:00</updated>
<author>
<name>A. Jesse Jiryu Davis</name>
<email>jesse@mongodb.com</email>
</author>
<published>2015-01-24T04:30:31+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/trollius.git/commit/?id=63efd76c158790c22f102b684e9b055d5679cf72'/>
<id>63efd76c158790c22f102b684e9b055d5679cf72</id>
<content type='text'>
To more closely match the standard Queue, asyncio.Queue has "join" and
"task_done". JoinableQueue is deleted.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
To more closely match the standard Queue, asyncio.Queue has "join" and
"task_done". JoinableQueue is deleted.
</pre>
</div>
</content>
</entry>
<entry>
<title>Python issue #23293: Cleanup IocpProactor.close()</title>
<updated>2015-01-23T00:14:44+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>victor.stinner@gmail.com</email>
</author>
<published>2015-01-23T00:14:44+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/trollius.git/commit/?id=f851742b5fd5da700f1eb954235ed57a51a078bd'/>
<id>f851742b5fd5da700f1eb954235ed57a51a078bd</id>
<content type='text'>
The special case for connect_pipe() is not more needed. connect_pipe() doesn't
use overlapped operations anymore.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The special case for connect_pipe() is not more needed. connect_pipe() doesn't
use overlapped operations anymore.
</pre>
</div>
</content>
</entry>
<entry>
<title>Close transports on error</title>
<updated>2015-01-22T23:52:06+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>victor.stinner@gmail.com</email>
</author>
<published>2015-01-22T23:52:06+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/trollius.git/commit/?id=a14dece8f3e9afb3dce4be9657bf4545e4dfd08a'/>
<id>a14dece8f3e9afb3dce4be9657bf4545e4dfd08a</id>
<content type='text'>
Fix create_datagram_endpoint(), connect_read_pipe() and connect_write_pipe():
close the transport if the task is cancelled or on error.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix create_datagram_endpoint(), connect_read_pipe() and connect_write_pipe():
close the transport if the task is cancelled or on error.
</pre>
</div>
</content>
</entry>
<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>IocpProactor.close(): don't cancel futures which are already cancelled</title>
<updated>2015-01-22T08:24:03+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>victor.stinner@gmail.com</email>
</author>
<published>2015-01-22T08:24:03+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/trollius.git/commit/?id=6973d095a461e7225e524407f6450642d877f8e8'/>
<id>6973d095a461e7225e524407f6450642d877f8e8</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Python issue #23095: IocpProactor.close() must not cancel pending</title>
<updated>2015-01-21T23:15:53+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>victor.stinner@gmail.com</email>
</author>
<published>2015-01-21T23:15:53+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/trollius.git/commit/?id=5d7bbcf567230dcfa8a419b1a0d462566c65ab83'/>
<id>5d7bbcf567230dcfa8a419b1a0d462566c65ab83</id>
<content type='text'>
_WaitCancelFuture futures
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
_WaitCancelFuture futures
</pre>
</div>
</content>
</entry>
<entry>
<title>BaseEventLoop._create_connection_transport() catchs any exception, not only</title>
<updated>2015-01-21T23:15:23+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>victor.stinner@gmail.com</email>
</author>
<published>2015-01-21T23:15:23+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/trollius.git/commit/?id=4f99b2f089c0c8f33b0cfd5c7d41f774579bcd39'/>
<id>4f99b2f089c0c8f33b0cfd5c7d41f774579bcd39</id>
<content type='text'>
Exception
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Exception
</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>
</feed>
