Closed YoniFeng closed 1 year ago
@bors-servo r+
:pushpin: Commit 120ba6c has been approved by jdm
:hourglass: Testing commit 120ba6c88e9337a810149b5afa4eecf32d8006d8 with merge 7f3789bddce385472aea95ae4c47df738d206f48...
:sunny: Test successful - checks-github Approved by: jdm Pushing 7f3789bddce385472aea95ae4c47df738d206f48 to master...
@jdm hate to have to ask again.. but could you please bump another version?
hopefully this is the last activity on this crate for a long time :)
Done!
Fix needed after #268 The fix is only for debug_assert correctness. There's no functional effect. i.e. version 0.8.6 might cause debug tests to fail, but it isn't a (functionally) breaking change.
Explanation Moving the lock to be per-bucket changed the
DYNAMIC_SET
's API so that it doesn't need to be locked (i.e.DYANMIC_SET
is not wrapped with aMutex
). TheAtom
'sfn drop
changed fromto
(the
lock()
is gone) Now when we enterDYNAMIC_SET.remove()
, there's no longer a lock guarantee. Until we lock the bucket, another thread could be in the middle of performing aDYNAMIC_SET.insert()
for the same string. Therefore, thedebug_assert!(value.ref_count.load(SeqCst) == 0)
is premature - it needs to occur after we take the lock for the bucket.Caught at https://github.com/swc-project/swc/pull/6980 in a failed test.