File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -39,9 +39,9 @@ impl StatusCast {
39
39
/// Updates the status to specified one and update version.
40
40
fn broadcast ( & self , status : ServingStatus ) {
41
41
let mut subscribers = self . subscribers . lock ( ) . unwrap ( ) ;
42
- let state = self . state . load ( Ordering :: Acquire ) ;
42
+ let state = self . state . load ( Ordering :: Relaxed ) ;
43
43
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 ) ;
45
45
46
46
for ( _, s) in subscribers. drain ( ) {
47
47
s. wake ( ) ;
@@ -80,7 +80,7 @@ impl Stream for StatusSubscriber {
80
80
81
81
let mut subscribers = s. cast . subscribers . lock ( ) . unwrap ( ) ;
82
82
83
- let cur_state = s. cast . state . load ( Ordering :: Acquire ) ;
83
+ let cur_state = s. cast . state . load ( Ordering :: Relaxed ) ;
84
84
if cur_state != s. last_state {
85
85
let status = state_to_status ( cur_state) ;
86
86
s. last_state = cur_state;
You can’t perform that action at this time.
0 commit comments