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

Adopt `Mutex` where possible

Open glbrntt opened this issue 1 year ago • 0 comments

Motivation:

Swift 6 has a Mutex which we can use in place of LockedValueBox or NIOLockedValueBox in a bunch of places.

Modifications:

  • Use Mutex where possible
  • This causes a number of other changes too as Mutex doesn't allocate: the allocations move to the type holding it instead. This makes sense as the objects which were previously structs didn't have value semantics.

Result:

Fewer uses of our own lock, no uses of NIOs lock

glbrntt avatar Aug 21 '24 09:08 glbrntt