@@ -156,7 +156,7 @@ impl Session {
156156 /// assert!(session.is_destroyed());
157157 /// # Ok(()) }) }
158158 pub fn destroy ( & mut self ) {
159- self . destroy . store ( true , Ordering :: Relaxed ) ;
159+ self . destroy . store ( true , Ordering :: SeqCst ) ;
160160 }
161161
162162 /// returns true if this session is marked for destruction
@@ -173,7 +173,7 @@ impl Session {
173173 /// # Ok(()) }) }
174174
175175 pub fn is_destroyed ( & self ) -> bool {
176- self . destroy . load ( Ordering :: Relaxed )
176+ self . destroy . load ( Ordering :: SeqCst )
177177 }
178178
179179 /// Gets the session id
@@ -229,7 +229,7 @@ impl Session {
229229 let mut data = self . data . write ( ) . unwrap ( ) ;
230230 if data. get ( key) != Some ( & value) {
231231 data. insert ( key. to_string ( ) , value) ;
232- self . data_changed . store ( true , Ordering :: Relaxed ) ;
232+ self . data_changed . store ( true , Ordering :: Release ) ;
233233 }
234234 }
235235
@@ -280,7 +280,7 @@ impl Session {
280280 pub fn remove ( & mut self , key : & str ) {
281281 let mut data = self . data . write ( ) . unwrap ( ) ;
282282 if data. remove ( key) . is_some ( ) {
283- self . data_changed . store ( true , Ordering :: Relaxed ) ;
283+ self . data_changed . store ( true , Ordering :: Release ) ;
284284 }
285285 }
286286
@@ -465,7 +465,7 @@ impl Session {
465465 /// # Ok(()) }) }
466466 /// ```
467467 pub fn data_changed ( & self ) -> bool {
468- self . data_changed . load ( Ordering :: Relaxed )
468+ self . data_changed . load ( Ordering :: Acquire )
469469 }
470470
471471 /// Resets `data_changed` dirty tracking. This is unnecessary for
@@ -489,7 +489,7 @@ impl Session {
489489 /// # Ok(()) }) }
490490 /// ```
491491 pub fn reset_data_changed ( & self ) {
492- self . data_changed . store ( false , Ordering :: Relaxed ) ;
492+ self . data_changed . store ( false , Ordering :: SeqCst ) ;
493493 }
494494
495495 /// Ensures that this session is not expired. Returns None if it is expired
0 commit comments