-
-
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
Invoke decRunning() when revertWorker() returns false #51
Conversation
Codecov Report
@@ Coverage Diff @@
## master #51 +/- ##
==========================================
- Coverage 95.5% 95.45% -0.06%
==========================================
Files 5 5
Lines 356 352 -4
==========================================
- Hits 340 336 -4
Misses 10 10
Partials 6 6
Continue to review full report at Codecov.
|
@choleraehyq |
@panjf2000 done |
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.
有时间看下我的 comment
@choleraehyq |
看了下代码,应该是 worker 的 defer 体中的 w.pool.decRunning()
w.pool.workerCache.Put(w) 还没执行完成而 if p1.Running() != 0 {
t.Errorf("pool should be empty after panic")
} 从而导致了报错。 |
Signed-off-by: Cholerae Hu <choleraehyq@gmail.com>
@panjf2000 done |
Fixed #50 |
Signed-off-by: Cholerae Hu choleraehyq@gmail.com
name: Pull request
about: Propose changes to the code
title: ''
labels: ''
assignees: ''
1. Are you opening this pull request for bug-fixs, optimizations or new feature?
2. Please describe how these code changes achieve your intention.
3. Please link to the relevant issues (if any).
4. Which documentation changes (if any) need to be made/updated because of this PR?
4. Checklist