Open larsclaussen opened 1 year ago
I just ran into this as well. A warning in the documentation would be much appreciated. Even more appreciated would be some way to cancel sync jobs, but I think this would require running them in a separate process with everything that entails, and not even ProcessPoolExecutor
seems to support killing the worker processes. It looks like a hard problem.
I'm not sure this can be fixed - maybe a warning in the docs is the least there can be done. As far as I understand there is no way to cancel a
concurrent.futures.Future
reliably. Not sure if arq just wraps the future returned by loop.run_in_executor with an asyncio.wait_for call? The underlying function, however, will not be stopped.To reproduce
Will give you this output