https://kotlinlang.org logo
#coroutines
Title
# coroutines
g

groostav

05/10/2018, 12:43 AM
yeah so I'm suggesting that the section on "Mutual Exclusion" is wrong because there is no requirement that thread A, having properly acquired the lock
mutex
, will see the value that thread B just wrote, having acquired and released the lock. Practically however this code might be perfectly fine, but given an evil CPU that only promises the bare minimum of the jvm memory model, you might see not correct values for
count
yeah I just started going through the locks section of my copy of Java Concurrency in Practice, and my suspicions are increasing not decreasing :S
5 Views