Skip to content

Commit 3d429c7

Browse files
committed
address comment
Signed-off-by: Jay Lee <[email protected]>
1 parent aec3dd1 commit 3d429c7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

health/src/service.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ impl StatusCast {
3939
/// Updates the status to specified one and update version.
4040
fn broadcast(&self, status: ServingStatus) {
4141
let mut subscribers = self.subscribers.lock().unwrap();
42-
let state = self.state.load(Ordering::Acquire);
42+
let state = self.state.load(Ordering::Relaxed);
4343
let new_state = ((state + VERSION_STEP) & !STATUS_MASK) | (status as usize);
44-
self.state.store(new_state, Ordering::Release);
44+
self.state.store(new_state, Ordering::Relaxed);
4545

4646
for (_, s) in subscribers.drain() {
4747
s.wake();
@@ -80,7 +80,7 @@ impl Stream for StatusSubscriber {
8080

8181
let mut subscribers = s.cast.subscribers.lock().unwrap();
8282

83-
let cur_state = s.cast.state.load(Ordering::Acquire);
83+
let cur_state = s.cast.state.load(Ordering::Relaxed);
8484
if cur_state != s.last_state {
8585
let status = state_to_status(cur_state);
8686
s.last_state = cur_state;

0 commit comments

Comments
 (0)