panjf2000 / ants

🐜🐜🐜 ants is the most powerful and reliable pooling solution for Go.
https://ants.andypan.me/
MIT License
12.69k stars 1.36k forks source link

opt: make ReleaseTimeout() more efficient in waiting workers to exit #329

Closed panjf2000 closed 2 months ago

panjf2000 commented 2 months ago

Also, this PR utilizes embedding structs to eliminate duplicate fields of Pool and PoolWithFunc.

codecov[bot] commented 2 months ago

Codecov Report

Attention: Patch coverage is 87.09677% with 12 lines in your changes missing coverage. Please review.

Project coverage is 90.52%. Comparing base (3ffd3da) to head (b9e7aaf).

Files Patch % Lines
pool.go 85.36% 5 Missing and 1 partial :warning:
pool_func.go 86.36% 5 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## dev #329 +/- ## ========================================== - Coverage 91.32% 90.52% -0.81% ========================================== Files 11 11 Lines 761 802 +41 ========================================== + Hits 695 726 +31 - Misses 45 53 +8 - Partials 21 23 +2 ``` | [Flag](https://app.codecov.io/gh/panjf2000/ants/pull/329/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Andy+Pan) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/panjf2000/ants/pull/329/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Andy+Pan) | `90.52% <87.09%> (-0.81%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Andy+Pan#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.