-
-
Notifications
You must be signed in to change notification settings - Fork 30.4k
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
OSError: handle is closed for ProcessPoolExecutor and run_in_executor #80462
Comments
The following code in Python 3.7.1
prints the following error:
I think this is related to https://bugs.python.org/issue34073 and https://bugs.python.org/issue34075 This happens in the Adaptive package https://adaptive.readthedocs.io/en/latest/docs.html#examples and the related issue is python-adaptive/adaptive#156 |
Using I've used one script: import sys
sys.path.append("/Users/basnijholt/Downloads/cpython/Lib/concurrent/futures/")
from random import random
from process import ProcessPoolExecutor
import asyncio
ioloop = asyncio.get_event_loop()
async def func(ioloop, executor):
result = await ioloop.run_in_executor(executor, random)
executor.shutdown(wait=False) # bug doesn't occur when `wait=True`
if __name__ == "__main__":
executor = ProcessPoolExecutor()
task = ioloop.run_until_complete(func(ioloop, executor)) and
Then did
I will see if I can fix it. |
I don't get the error on 3.11, and I think it may have been fixed under bpo-39104. |
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: