We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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
Invoking to_thread.run_sync() seems to prevent meta-class destructors of completely unrelated classes from being called on shutdown.
to_thread.run_sync()
import trio class deltype(type): def __del__(self): print(f"{self.__name__} class deleted") Test = deltype("Test", (object,), {}) async def async_main(): await trio.to_thread.run_sync(lambda: print('hi')) await trio.sleep(0) trio.run(async_main)
expected output:
hi Test class deleted
actual output:
hi
if the run_sync() is commented out, the meta-class destructor is called as expected:
run_sync()
Test class deleted
The text was updated successfully, but these errors were encountered:
"git bisect" says the thread cache is the culprit.
1d1f871
Sorry, something went wrong.
That was reasonably easy ;-)
Successfully merging a pull request may close this issue.
Invoking
to_thread.run_sync()
seems to prevent meta-class destructors of completely unrelated classes from being called on shutdown.expected output:
actual output:
if the
run_sync()
is commented out, the meta-class destructor is called as expected:The text was updated successfully, but these errors were encountered: