Skip to content
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

make Context.Value method concurrent safe #2183

Closed
wants to merge 1 commit into from
Closed

make Context.Value method concurrent safe #2183

wants to merge 1 commit into from

Conversation

fengyoulin
Copy link

Make Context.Value, Context.Get, and Context.Set methods concurrent safe, to be consistent with Go's context.Context.

@codecov
Copy link

codecov bot commented Dec 12, 2019

Codecov Report

Merging #2183 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #2183      +/-   ##
=========================================
+ Coverage   98.49%   98.5%   +<.01%     
=========================================
  Files          40      40              
  Lines        2257    2272      +15     
=========================================
+ Hits         2223    2238      +15     
  Misses         18      18              
  Partials       16      16
Impacted Files Coverage Δ
logger.go 100% <100%> (ø) ⬆️
context.go 98.68% <100%> (+0.02%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 168fa94...53422c4. Read the comment docs.

@fengyoulin
Copy link
Author

#700

@bestgopher
Copy link
Contributor

#700
when the context has to be passed to a goroutine,we should use context.Copy get a new context

@appleboy
Copy link
Member

duplicated of #1391

@appleboy appleboy closed this Apr 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants