dynstage: fix data race with async logging system
This commit is contained in:
parent
8fe2cde9e6
commit
f5e8cfe65e
1 changed files with 4 additions and 0 deletions
|
@ -294,6 +294,10 @@ uint32_t dynstage_get_generation(void) {
|
|||
|
||||
bool dynstage_reload_library(void) {
|
||||
if(dynstage.lib) {
|
||||
// In-flight async log messages may still have pointers to static strings inside the old lib
|
||||
// Wait for them to finish processing so it's safe to unload
|
||||
log_sync();
|
||||
|
||||
dlclose(dynstage.lib);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue