Skip to content

Commit

Permalink
Synchronize on compare_exchange failure in create_hashtable
Browse files Browse the repository at this point in the history
  • Loading branch information
tmiasko committed Jan 22, 2020
1 parent 8714b64 commit a02c309
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/src/parking_lot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,8 @@ fn create_hashtable() -> &'static HashTable {
let table = match HASHTABLE.compare_exchange(
ptr::null_mut(),
new_table,
Ordering::Release,
Ordering::Relaxed,
Ordering::AcqRel,
Ordering::Acquire,
) {
Ok(_) => new_table,
Err(old_table) => {
Expand Down

0 comments on commit a02c309

Please sign in to comment.