does anyone know why the rust `Logger` struct has ...
# development
h
does anyone know why the rust
Logger
struct has an
AtomicBool
field
show_rust_3rdparty_logs
? specifically why this needs to be an atomic bool?
a
Pretty sure it's too avoid needing to acquire a mutex every time we log
We don't know at initialisation time what value that should take because we init the engine before we parse flags maybe?
So we can't set it right at construction time
And if we changed it in a non-atomic way, all reads would need at least an RW mutex around them
Using atomics means we can avoid that mutex