https://github.com/JuliaLang/julia
Revision 20752db7c1e78c58206c1480533c25b3ae4a7fc8 authored by Nathan Daly on 30 May 2023, 16:23:39 UTC, committed by GitHub on 30 May 2023, 16:23:39 UTC
Ensure the lock is precise, so that we are allowed to register new
atexit hooks from inside an atexit hook. But then disable `atexit()`
when shutting down after it finishes running.

Add tests that cover all the cases:
1. registering a hook from inside a hook
2. registering a hook from another thread while hooks are running
3. attempting to register a hook after all hooks have finished
   (disallowed)

Fixes #49841
Co-authored-by: Jameson Nash <vtjnash@gmail.com>
1 parent ed5bd4c
History
Tip revision: 20752db7c1e78c58206c1480533c25b3ae4a7fc8 authored by Nathan Daly on 30 May 2023, 16:23:39 UTC
thread safety: lock around atexit_hooks global (#49868)
Tip revision: 20752db
File Mode Size
.devcontainer
.github
base
cli
contrib
deps
doc
etc
src
stdlib
test
.buildkite-external-version -rw-r--r-- 5 bytes
.clang-format -rw-r--r-- 3.3 KB
.clangd -rw-r--r-- 114 bytes
.codecov.yml -rw-r--r-- 52 bytes
.git-blame-ignore-revs -rw-r--r-- 371 bytes
.gitattributes -rw-r--r-- 65 bytes
.gitignore -rw-r--r-- 514 bytes
.mailmap -rw-r--r-- 12.1 KB
CITATION.bib -rw-r--r-- 513 bytes
CITATION.cff -rw-r--r-- 940 bytes
CONTRIBUTING.md -rw-r--r-- 23.1 KB
HISTORY.md -rw-r--r-- 363.4 KB
LICENSE.md -rw-r--r-- 1.3 KB
Make.inc -rw-r--r-- 54.5 KB
Makefile -rw-r--r-- 29.8 KB
NEWS.md -rw-r--r-- 5.5 KB
README.md -rw-r--r-- 7.3 KB
THIRDPARTY.md -rw-r--r-- 3.8 KB
VERSION -rw-r--r-- 11 bytes
julia.spdx.json -rw-r--r-- 35.8 KB
pkgimage.mk -rw-r--r-- 5.8 KB
sysimage.mk -rw-r--r-- 4.2 KB

README.md

back to top