[Rpm-maint] [rpm-software-management/rpm] Fix excessive use of thread local storage (RhBug:1722181) (#759)
notifications at github.com
Thu Jun 20 13:08:20 UTC 2019
> The __thread uses in rpmsq don't make sense at all in reality, so better revert and rethink from scratch.
I don't know what all is writing/reading to those variables but, global mutable statics are basically always wrong. In Rust for example a common pattern is `lazy_static!` + `Mutex`, like [this bit of code in rpm-ostree](https://github.com/projectatomic/rpm-ostree/blob/c94bd08b02499a3f2a5804f5c2ba207a0afbda18/rust/src/progress.rs#L50).
(Or of course for integer variables like thise atomics can be used)
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Rpm-maint