Open
Description
I believe there is a possible race condition in the SpinLock class. The following serialization shows the issue:
count: 0, writer: true
R1 writer.get => true
W1 writer.set(false)
R1 writer.get => false
W2 writer.set(true)
W2 count.get => 0
W2 enters critical section
R1 count.incrementAndGet => 1
R1 enters critical section
It looks like it is possible for a reader and a writer to be in the critical section at the same time.
Metadata
Metadata
Assignees
Labels
No labels