spring-projects / spring-framework

Spring Framework
https://spring.io/projects/spring-framework
Apache License 2.0
56.77k stars 38.16k forks source link

Use optimistic locking where possible in `ResponseBodyEmitter` #33831

Closed lucky8987 closed 3 weeks ago

lucky8987 commented 4 weeks ago
  1. Use CAS instead of synchronized to set the complete state.
  2. Reduce the synchronized range added by the callback function.
pivotal-cla commented 4 weeks ago

@lucky8987 Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

pivotal-cla commented 4 weeks ago

@lucky8987 Thank you for signing the Contributor License Agreement!

simonbasle commented 3 weeks ago

Thanks for the PR @lucky8987, this looks like a good performance improvement. That close to the release, I'll review it a bit more in depth and discuss it with other team members, but I expect this should make the cut 👍

lucky8987 commented 3 weeks ago

Thanks for the PR @lucky8987, this looks like a good performance improvement. That close to the release, I'll review it a bit more in depth and discuss it with other team members, but I expect this should make the cut 👍

OK,this is my first PR and I'm really looking forward to it being accepted.

simonbasle commented 3 weeks ago

@lucky8987 good news, then: it's been merged 😉