abiosoft/semaphore

A potential race condition

Closed this issue · 1 comments

Acquire is ch <- 1 and release is <- ch. According to the Memory Model, there is no guarantee that a buffered channel receiving happens before the corresponding sending.
So I think the Acquire is <-ch while release is ch <- 1.

Thanks