Revert "Use store instead of fetch_add for atomics"
This reverts commit d4bd0ef1ca
.
This commit is contained in:
parent
878df8da40
commit
f85755b468
|
@ -19,15 +19,15 @@ pub struct Stats {
|
|||
|
||||
impl Stats {
|
||||
pub fn add_connection(&self) {
|
||||
self.connections.store(1, Ordering::Relaxed);
|
||||
self.connections.fetch_add(1, Ordering::Relaxed);
|
||||
}
|
||||
|
||||
pub fn add_rx_bytes(&self, n: usize) {
|
||||
self.rx.store(n, Ordering::Relaxed);
|
||||
self.rx.fetch_add(n, Ordering::Relaxed);
|
||||
}
|
||||
|
||||
pub fn add_tx_bytes(&self, n: usize) {
|
||||
self.tx.store(n, Ordering::Relaxed);
|
||||
self.tx.fetch_add(n, Ordering::Relaxed);
|
||||
}
|
||||
|
||||
pub fn connections(&self) -> usize {
|
||||
|
|
Loading…
Reference in New Issue
Block a user