-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use atexit to avoid program shutdown race
Summary: We cannot generally expect detached threads to run to completion once static shutdown begins -- that is undefined behavior. Instead, we now register an atexit callback to wait for any detached threads to complete. This avoids any compiler/linker decisions lining up static destruction in the "right" order. Reviewed By: RomanFedotovFB Differential Revision: D50750129 fbshipit-source-id: 29afb15a3b0b82c25594bad475f1314114120444
- Loading branch information
1 parent
d31040c
commit a08444d
Showing
2 changed files
with
32 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters