A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2014-March/133294.html below:

[Python-Dev] asyncio.wait(FIRST_COMPLETED) returns more than one completions

[Python-Dev] asyncio.wait(FIRST_COMPLETED) returns more than one completions - 3.4rc2 [Python-Dev] asyncio.wait(FIRST_COMPLETED) returns more than one completions - 3.4rc2Imran Geriskovan imran.geriskovan at gmail.com
Wed Mar 19 19:07:08 CET 2014
Code below has been written with the intension of acquiring ONLY one lock.
There are two issues:

1- Sometimes it returns more than one lock in done.
2- Sometimes, even if wait exits with zero or one locks, it seems
there are other locks are acquired too. Though, I couldn't isolate
the exact case for this.

It sounds like some background shield() is at works.

I kindly request your comments.


locks = [some asyncio.Locks...]
sel = [Pack(l.acquire(), l) for l in locks]
done, pend = asyncio.wait(sel, timeout=10, return_when=FIRST_COMPLETED)
...
@coroutine
def Pack(co, obj):
    yield from co
    return obj


Regards,
Imran
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4