Closed padenot closed 1 year ago
To address that, we'd either need to ensure async logging is never active when this is changed,
I went this route, and did other things as well. It's a lot bigger, a tad more complex, but I added tests (that pass locally when stress tested (a lot more iterations on a bunch of runs) on aarch64/M1 max and x86_64/Linux).
Matthew, I ended up slightly modifying the test to remove delay(...)
calls and use atomics to ensure that callbacks were called, because otherwise the test was super unreliable on the CI here. I think it's better regardless.
When logging asynchrously, there's ample time for the pointer to be nulled.