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:
https://pypi.python.org/pypi/futures

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.
https://pypi.python.org/pypi/trollius

----------
files: asyncio_sync.patch
keywords: patch
messages: 207368
nosy: gvanrossum, haypo
priority: normal
severity: normal
status: open
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 <rep...@bugs.python.org>
<http://bugs.python.org/issue20130>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to