grpc-kotlin
grpc-kotlin copied to clipboard
Remove unneeded concurrency things
The mutex and atomicBolean aren't needed in this context.
The mutex is only contained in a local variable in sequential code. It isn't shared w/ any other threads. The same with the atomic bolean.
Both of these constructs are inside the launched co-routine, and aren't shared outside. Therefore they can't help control any other shared access.
The gist of this is I'm looking into why we have some nasty corner cases. This isn't it, but it's a slight optimization that could be made wrt the flow handling
@lowasser Just checking in to see if this project is still alive or if you have any questions/concerns on this?
@jamesward Thoughts on this?
We will need @lowasser to review this.
Ok. The idea here is none of these mutexes or atomicBooleans are ever used concurrently they're very sequential in their nature, so having the lock there doesn't accomplish anything.
This does look safe to me.