I tested for a while, and it looks to me that the variable in thread_local! will be dropped when the thread finished. Can I rely on this feature? If I remembered right, in C++, destructor of a local_thead is allowed to not get called by standard. And so does #[thread_local] feature in Rust. And i…