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 CapacityLimiter memory leak. #576

Merged
merged 3 commits into from
Jul 30, 2018
Merged

Fix CapacityLimiter memory leak. #576

merged 3 commits into from
Jul 30, 2018

Conversation

Fuyukai
Copy link
Member

@Fuyukai Fuyukai commented Jul 29, 2018

Closes #548.

Copy link
Member

@njsmith njsmith left a comment

Choose a reason for hiding this comment

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

Needs a newsfragment

Otherwise lgtm

Btw, if you phrase your commit message/PR description slightly differently – like "closes #XX" or "fixes #XX" – GitHub will automatically close the issue when the PR is merged. Not a big deal in any one case, but a good habit to get into.


async with _core.open_nursery() as n:
n.start_soon(limiter.acquire)
await _core.checkpoint() # give it a chance to run the task
Copy link
Member

Choose a reason for hiding this comment

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

A more robust way to do this is wait_all_tasks_blocked.

@codecov
Copy link

codecov bot commented Jul 29, 2018

Codecov Report

Merging #576 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #576      +/-   ##
==========================================
+ Coverage   99.27%   99.27%   +<.01%     
==========================================
  Files          89       89              
  Lines       10628    10647      +19     
  Branches      747      747              
==========================================
+ Hits        10551    10570      +19     
  Misses         59       59              
  Partials       18       18
Impacted Files Coverage Δ
trio/tests/test_sync.py 100% <100%> (ø) ⬆️
trio/_sync.py 100% <100%> (ø) ⬆️
trio/_ssl.py 100% <0%> (ø) ⬆️

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 fd0d877...76fba4b. Read the comment docs.

Fuyukai and others added 3 commits July 29, 2018 13:30
Also an excuse to force the tests to re-run so I can merge this.
@njsmith
Copy link
Member

njsmith commented Jul 30, 2018

Closing/reopening to tickle travis, hopefully clear #584 failures.

@njsmith njsmith closed this Jul 30, 2018
@njsmith njsmith reopened this Jul 30, 2018
@njsmith njsmith merged commit 558e1c0 into python-trio:master Jul 30, 2018
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.

2 participants