I debugged a deadlock that was rarely happening running the demo, this fixes that on my end, I also added a few more atomic operations (mainly to the flags) because -sanitize:thread was complaining about those.
Also it seems like the duration on darwin is calculated wrong, time.Duration is already in nanoseconds but it still does a * 1000.
I debugged a deadlock that was rarely happening running the demo, this fixes that on my end, I also added a few more atomic operations (mainly to the flags) because -sanitize:thread was complaining about those.
Also it seems like the duration on darwin is calculated wrong,
time.Duration
is already in nanoseconds but it still does a* 1000
.