Skip to content

Conversation

@ykalayy
Copy link
Contributor

@ykalayy ykalayy commented Apr 19, 2022

Fix #57

  1. closed state access and updates are wrapped with get/set functions. To eliminate possible deadlocks on pool close

@ykalayy ykalayy changed the title fix deadlock https://github.com/jolestar/go-commons-pool/issues/57 fix deadlock #57 Apr 19, 2022
@ykalayy
Copy link
Contributor Author

ykalayy commented Apr 19, 2022

@jolestar Could you please review the PR?

Copy link
Owner

@jolestar jolestar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks

@ykalayy
Copy link
Contributor Author

ykalayy commented Apr 19, 2022

@jolestar I forget to stop testTimeoutTicker in UT. and Ofc, It is affected other tests in the suit. I updated.
Added timer stop in UT:

defer testTimeoutTicker.Stop()

Could you review it again, please?

@ykalayy
Copy link
Contributor Author

ykalayy commented Apr 19, 2022

Added ticker stop in UT:

defer ticker.Stop()

@codecov
Copy link

codecov bot commented Apr 19, 2022

Codecov Report

Merging #58 (6c285b9) into master (1d53859) will increase coverage by 0.25%.
The diff coverage is 90.90%.

@@            Coverage Diff             @@
##           master      #58      +/-   ##
==========================================
+ Coverage   91.75%   92.01%   +0.25%     
==========================================
  Files           8        8              
  Lines         898      902       +4     
==========================================
+ Hits          824      830       +6     
+ Misses         40       39       -1     
+ Partials       34       33       -1     
Impacted Files Coverage Δ
pool.go 91.53% <90.90%> (+0.64%) ⬆️

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 1d53859...6c285b9. Read the comment docs.

@jolestar jolestar merged commit 3f25f85 into jolestar:master Apr 20, 2022
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.

deadlock in Close

3 participants