Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
molyss
· 3y ago · 0 comments
When B wakes up the 1st thing it does is state.exchange(sleeper,…), which returns unlocked, and set the state to sleeper. I think it works.
I had some concerns about the second one, but I think it works too…
Comments
[–]
gpderetta
3y ago
Oh, now I see it, very nice. I had missed that there is at least one additional exchange after wait returns.