Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Deque]: Fix bogus assert in Deque._Storage._ensureUnique
A non-unique reference to a storage instance can legitimately become unique at any point, due to other references (say, held, by another thread) getting destroyed. `Deque`’s `ensureUnique` implementation currently invokes the uniqueness check two times in quick succession, expecting it to return false both times. In rare circumstances, this can lead to a spurious trap in concurrent environments. Fix this by avoiding calling `isUnique` more than once.
- Loading branch information