[New-bugs-announce] [issue20130] asyncio: implement a synchronous executor if concurrent.futures is missing
report at bugs.python.org
Sun Jan 5 11:22:35 CET 2014
New submission from STINNER Victor:
On old FreeBSD platforms (FreeBSD 6), concurrent.futures cannot be used and fail with an ImportError because of a limit on POSIX semaphores: see issue #10798. (See also maybe issue #10348 "multiprocessing: use SysV semaphores on FreeBSD" closed as WONTFIX.)
For asyncio, the test is currently skipped on this platform: see issue #19635.
(See also maybe issue #19295 "Make asyncio work without threads" closed as WONTFIX.)
I propose to implement a simple fallback using an synchronous executor (block until we get the result) which would be used by getaddrinfo() and getnameinfo() methods of EventLoop.
This issue is also motivated by my Trollius project, a backport of asyncio for Python 2.7, where concurrent.futures is not available. An optional backport, the "futures" project, can be used:
Attached patch is a work-in-progress, it removes the dependency to concurrent.futures but doesn't implement the synchronous executor yet. It's the changes I wrote in Trollius 0.1.
nosy: gvanrossum, haypo
title: asyncio: implement a synchronous executor if concurrent.futures is missing
versions: Python 3.4
Added file: http://bugs.python.org/file33317/asyncio_sync.patch
Python tracker <report at bugs.python.org>
More information about the New-bugs-announce