-
Notifications
You must be signed in to change notification settings - Fork 52
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
dtor - broken by upgrading tokio from 1.38.0 to 1.39.1 - use of std::thread::current() is not possible after the thread's local data has been destroyed #304
Comments
After some try and error I found out it worked until tokio 1.38.0 Here is a minimal example. Just type (With fixed Cargo.lock, working):
|
Unfortunately this is a life-before- and life-after-main issue. I'll leave this open as there should be some documentation on this. |
I've hit this too. I'm using this with testcontaineres to clean up the containers when the tests finish. @mmastrac You mentioned there should be some docs, do you have any pointers to what those docs should be? I'd be happy to put a PR together, or at least help put one together. |
From my point of view as a Tokio maintainer, using Tokio in
Using Tokio definitely counts as relying on Rust's stdlib services. |
@irbull I think README.md is the best place for it. Happy to accept PRs for it. It may be difficult to find precise information on restrictions -- the Rust developers don't take this possibility into account, and therefore it's just likely that things break from version to version with no guarantees whatsoever. I think this might be a good opportunity to bring up a better-supported solution than this crate with the Rust team itself. There's clearly enough interest in the concept that it might be useful to start the discussion on how this functionality can roll into the Rust project itself. |
Hello,
in the past I used dtor in combination with tokio to clean up my test environment after the test execution.
Everything worked fine.
But after I removed my Cargo.lock and recreated it, I received alway following message :
Here the simple testfile:
I'm not sure where the origin of this problem is. Is it a ctor problem or a problem of a other specific async library?
Here you see the diff of my Cargo.lock:
https://www.diffchecker.com/N8nESogY/
Sorry for the form, but I found no better solution to provide the differences, without copying them step by step.
T
The text was updated successfully, but these errors were encountered: