Channels
welcome
github-notifications
development
announce
random
plugins
general
pex
Powered by
#development
Title
h
hundreds-breakfast-49010
04/18/2020, 1:37 AM
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
average-vr-56795
04/18/2020, 11:57 AM
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
Post