Skip to content
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

QThreadExecutor should inherit from concurrent.futures.ThreadPoolExecutor #102

Open
stevenwinfield opened this issue Jan 7, 2019 · 0 comments

Comments

@stevenwinfield
Copy link

According to the Python 3.7 docs

awaitable loop.run_in_executor(executor, func, *args)
Arrange for func to be called in the specified executor.
The executor argument should be an concurrent.futures.Executor instance. The default executor is used if executor is None.

and, more strictly:

loop.set_default_executor(executor)
Set executor as the default executor used by run_in_executor(). executor should be an instance of ThreadPoolExecutor.
Deprecated since version 3.7: Using an executor that is not an instance of ThreadPoolExecutor is deprecated and will trigger an error in Python 3.9.
executor must be an instance of concurrent.futures.ThreadPoolExecutor.

So it looks like QThreadExecutor will need to inherit from concurrent.futures.ThreadPoolExecutor to keep everyone happy.

henry232323 pushed a commit to henry232323/quamash that referenced this issue Feb 26, 2019
`QThreadExecutor` now inherits from the `concurrent.futures.Executor`
abstract class. See harvimt#102
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant