grpc-kotlin icon indicating copy to clipboard operation
grpc-kotlin copied to clipboard

Remove unneeded concurrency things

Open taer opened this issue 2 years ago • 1 comments

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.

taer avatar Sep 28 '22 02:09 taer

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

ghost avatar Sep 28 '22 02:09 ghost

@lowasser Just checking in to see if this project is still alive or if you have any questions/concerns on this?

taer avatar Mar 10 '23 14:03 taer

@jamesward Thoughts on this?

taer avatar Sep 13 '23 21:09 taer

We will need @lowasser to review this.

jamesward avatar Sep 14 '23 15:09 jamesward

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.

taer avatar Sep 14 '23 18:09 taer

This does look safe to me.

lowasser avatar Dec 01 '23 04:12 lowasser