-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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: add a new API ReleaseTimeout
for the default pool
#281
Conversation
We should add a new API like |
I added a function called ReleaseTimeout() to ants.go. Is that what you had in mind? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add some new test cases for this new API.
…n defaultAntsPool and test new function
ReleaseTimeout
for the default pool
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #281 +/- ##
==========================================
+ Coverage 92.44% 92.46% +0.01%
==========================================
Files 9 9
Lines 768 770 +2
==========================================
+ Hits 710 712 +2
Misses 44 44
Partials 14 14
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks~
…)" This reverts commit b3f3a38.
I did not check carefully before, we've changed the default branch from |
Please open a new pull request to branch |
name: Unblock goPurge and goTicktock in defaultAntsPool
about: ants.Release() calls defaultAntsPool.Release() which leaves goPurge and goTicktock still running in the background. ants.Release() should close the context for goPurge and goTicktock. This can be accomplished by calling defaultAntsPool.ReleaseTimeout().
title: 'Unblock goPurge and goTicktock in defaultAntsPool'
labels: ''
assignees: ''
1. Are you opening this pull request for bug-fixs, optimizations or new feature?
Bug-fix.
2. Please describe how these code changes achieve your intention.
goPurge and goTicktock are left on the stack because there is no way to close those methods started by the defaultAntsPool. This PR should add a fix for that.
3. Please link to the relevant issues (if any).
#244
4. Which documentation changes (if any) need to be made/updated because of this PR?
4. Checklist