File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -228,8 +228,13 @@ impl Global {
228
228
/// `try_advance()` is annotated `#[cold]` because it is rarely called.
229
229
#[ cold]
230
230
pub ( crate ) fn try_advance ( & self , guard : & Guard ) -> Epoch {
231
- let global_epoch = self . epoch . load ( Ordering :: Relaxed ) ;
232
- atomic:: fence ( Ordering :: SeqCst ) ;
231
+ let global_epoch = if cfg ! ( crossbeam_sanitize_thread) {
232
+ self . epoch . load ( Ordering :: SeqCst )
233
+ } else {
234
+ let global_epoch = self . epoch . load ( Ordering :: Relaxed ) ;
235
+ atomic:: fence ( Ordering :: SeqCst ) ;
236
+ global_epoch
237
+ } ;
233
238
234
239
// TODO(stjepang): `Local`s are stored in a linked list because linked lists are fairly
235
240
// easy to implement in a lock-free manner. However, traversal can be slow due to cache
You can’t perform that action at this time.
0 commit comments