As-is, DefaultEnv::Finalize
does not look thread-safe. Is there a mutex held by the caller? To make it thread-safe, you'd want to do something like:
PostMaster* post_master = sPostMaster.exchange(nullptr);
if (post_master) {
...
delete post_master;
}
This guarantees only one thread enters the conditional block.
—
Reply to this email directly or view it on GitHub.
Use REPLY-ALL to reply to list
To unsubscribe from the XROOTD-DEV list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=XROOTD-DEV&A=1