04/18/2020, 1:37 AM
does anyone know why the rust
struct has an
? specifically why this needs to be an atomic bool?
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