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

fix: race condition in ParseWithFuncs #223

Merged
merged 1 commit into from May 12, 2022
Merged

fix: race condition in ParseWithFuncs #223

merged 1 commit into from May 12, 2022

Conversation

caarlos0
Copy link
Owner

we were modifying the map, not it returns from a function, so it's always a fresh copy and there's no way to get into race conditions there.

also improved tests so they don't mess with each other too much, also ensuring they cleanup their envs after.

closes #222

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
@codecov
Copy link

codecov bot commented May 11, 2022

Codecov Report

Merging #223 (a1fcf25) into main (863e59d) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main     #223   +/-   ##
=======================================
  Coverage   98.83%   98.84%           
=======================================
  Files           2        2           
  Lines         343      345    +2     
=======================================
+ Hits          339      341    +2     
  Misses          4        4           
Impacted Files Coverage Δ
env.go 98.81% <100.00%> (+<0.01%) ⬆️

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 863e59d...a1fcf25. Read the comment docs.

@caarlos0 caarlos0 merged commit 302a103 into main May 12, 2022
@caarlos0 caarlos0 deleted the race branch May 12, 2022 00:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

sporadic concurrent map read and map write issue - when using custom parsers
1 participant