New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
asyncio/OpenBSD: make concurrent.futures dependency optional #64865
Comments
On old FreeBSD versions and on the latest OpenBSD (5.4), the multiprocessing module is not available because POSIX semaphores are not supported by the OS. See issues bpo-5725 and bpo-10348 to use SysV semaphores. bpo-10348 was closed because "implementing SysV semaphores would be a step backwards, plus the API is a real pain" (wrote Charles-François Natali). Would it be possible to make concurrent.futures dependency optional? In Trollius project (port of asyncio on Python 2), I implemented a very simple synchronous executor used by default as a fallback when concurrent.futures is not available (Trollius uses futures, backport of concurrent.futures for Python 2). Attached patch is the synchronous executor adapted again on asyncio. asyncio.executor.Future (when concurrent.futures is missing) is the simplest class and has a different API than concurrent.futures.Future. It is directly created with known result (value or exeption). |
Oh, it looks like concurrent.futures and asyncio now works on OpenBSD 5.5: OpenBSD 5.5 added support of POSIX semaphores? |
I'd prefer not to add a bad hack to support such a broken platform. If it doesn't have semaphores, not much Python code will run. Maybe the dummy_threading module can be used instead? |
Oh, in fact concurrent.futures and multiprocessing are available on OpenBSD 5.5 (see the new buildbot created yesterday). test_asyncio is running on this buildbot. So I suggest to upgrade to OpenBSD 5.5 (currently under development) if you would like to use asyncio. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: