-
Notifications
You must be signed in to change notification settings - Fork 558
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: safe copy ctx #927
base: develop
Are you sure you want to change the base?
feat: safe copy ctx #927
Conversation
013c11a
to
47a0270
Compare
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## develop #927 +/- ##
===========================================
- Coverage 80.30% 79.43% -0.88%
===========================================
Files 97 97
Lines 9602 9699 +97
===========================================
- Hits 7711 7704 -7
- Misses 1408 1492 +84
- Partials 483 503 +20
☔ View full report in Codecov by Sentry. |
ed2d9c6
to
f05c766
Compare
这个草案是不打算继续推进了吗 我看到 RequestContext结构体中Keys 是导出类型,读写锁又是私有的,这实际上应该是一个设计缺陷? 我看gin的实现也是这样的 |
推进的,这个 pr 的作用仔细看看哈,是为了保证 copy 出来的 RequestContext 是并发安全的。 |
What type of PR is this?
feat
Check the PR title.
(Optional) Translate the PR title into Chinese.
将ctx.Copy()返回的只读ctx变成并发安全
(Optional) More detailed description for this PR(en: English/zh: Chinese).
en:
zh(optional):
(Optional) Which issue(s) this PR fixes:
(Optional) The PR that updates user documentation: