issues
search
LIHPC-Computational-Geometry
/
coupe
the concurrent partitioner
https://LIHPC-Computational-Geometry.github.io/coupe/
Apache License 2.0
12
stars
3
forks
source link
arcswap: lock vertex *before* gain calculations (and other things)
#278
Closed
hhirtz
closed
1 year ago
hhirtz
commented
1 year ago
Otherwise there can be concurrent moves on neighbors V and U when:
Thread A computes the gain of V
Thread B computes the gain of U
Thread A locks V
Thread A checks for locks on neighbors of V -> there are none because B didn't lock U yet
Thread A moves V and releases the lock
Thread B locks U
Thread B checks for locks on neighbors of U -> there are none because A released the lock
Thread B moves U
Otherwise there can be concurrent moves on neighbors V and U when: