This PR removes an old workaround around non-implemented C++11 features in the thread finalization. This `ifdef` dates back to approximately 2015 as can be seen [here](https://github.com/leanprover/lean3/blame/master/src/util/thread.cpp#L177), the comments mention that it was originally implemented because not all compilers at the time were able to support the C++11 `thread_local` keyword. 10 years later this is hopefully the case and we can remove this workaround. There is an additional motivation for doing this, `lean::initialize_thread` contains the following allocation: ```cpp g_thread_finalizers_mgr = new thread_finalizers_manager; ``` this is supposed to be freed at some point but: ```cpp // TODO(gabriel): race condition with thread finalizers void delete_thread_finalizer_manager() { // delete g_thread_finalizers_mgr; // g_thread_finalizers_mgr = nullptr; } ``` so `g_thread_finalizers_mgr` leaks upon repeated invocation of `lean::initialize_thread`. Note that Windows has already been using this alternative implementation for a while so the alternative implementation has (hopefully) not rotten away in the meantime. |
||
|---|---|---|
| .. | ||
| lib | ||
| apply.lean | ||
| bench.sh | ||
| benchReelabRss.lean | ||
| collideProfiles.lean | ||
| diff_changelogs.py | ||
| gen_constants_cpp.py | ||
| gen_tokens_cpp.py | ||
| issues_summary.sh | ||
| mathlib-bench | ||
| merge_remote.py | ||
| patch.sh | ||
| prepare-llvm-linux.sh | ||
| prepare-llvm-macos.sh | ||
| prepare-llvm-mingw.sh | ||
| push_repo_release_tag.py | ||
| rebase-stage0.sh | ||
| reformat.lean | ||
| release_checklist.py | ||
| release_notes.py | ||
| release_repos.yml | ||
| release_steps.py | ||