Closed nikhilro closed 5 years ago
The global run()
function executes code using the kernel as a context manager. The context manager already executes Kernel.run(shutdown=True)
. Adding a shutdown
option to run()
would be redundant. Perhaps I'm missing something.
Ahh yes, you're right. I checked my local version and turns out I was using v0.9
from pip with this as __exit__
which was wrongly intercepting exceptions. Simply changing those two lines in __exit__
with the now correct version properly shuts down. Apologies, for my laziness in just quickly glancing over the codebase. Will close this now. Thanks
Hey David (@dabeaz), we would sometimes get this
RuntimeError
when something deep in one of our tasks went awry. It was resolved by usingcurio.Kernel(...).run(coro, ..., shutdown=True)
.curio.run
should expose that control since it seems natural to be unaware of the Kernel and mostly only rely on the helper function. Thanks!