Title: gh-102024: Reduced _idle_semaphore.release calls by jackcvr · Pull Request #102025 · python/cpython · GitHub
Open Graph Title: gh-102024: Reduced _idle_semaphore.release calls by jackcvr · Pull Request #102025 · python/cpython
X Title: gh-102024: Reduced _idle_semaphore.release calls by jackcvr · Pull Request #102025 · python/cpython
Description: _idle_semaphore.release() is called if only work_queue is empty Benchmarks: submit_only: ./python -m timeit -n 100000 -r 10 -s 'W = 1; from concurrent.futures import ThreadPoolExecutor; tpe = ThreadPoolExecutor(W)' 'tpe.submit(lambda: None)' before: W=1: 100000 loops, best of 10: 17.6 usec per loop W=2: 100000 loops, best of 10: 10.5 usec per loop W=4: 100000 loops, best of 10: 10.5 usec per loop after: W=1: 100000 loops, best of 10: 7.42 usec per loop W=2: 100000 loops, best of 10: 7.5 usec per loop W=4: 100000 loops, best of 10: 7.5 usec per loop submit_then_wait: ./python -m timeit -n 10 -r 10 -s 'W = 1; from concurrent.futures import ThreadPoolExecutor, wait; tpe = ThreadPoolExecutor(W)' 'fs=[tpe.submit(lambda: None) for _ in range(10_000)]; wait(fs)' before: W=1: 10 loops, best of 10: 110 msec per loop W=2: 10 loops, best of 10: 100 msec per loop W=4: 10 loops, best of 10: 114 msec per loop after: W=1: 10 loops, best of 10: 85.2 msec per loop W=2: 10 loops, best of 10: 83.9 msec per loop W=4: 10 loops, best of 10: 86.5 msec per loop Issue: gh-102024
Open Graph Description: _idle_semaphore.release() is called if only work_queue is empty Benchmarks: submit_only: ./python -m timeit -n 100000 -r 10 -s 'W = 1; from concurrent.futures import ThreadPoolExecutor; tpe = T...
X Description: _idle_semaphore.release() is called if only work_queue is empty Benchmarks: submit_only: ./python -m timeit -n 100000 -r 10 -s 'W = 1; from concurrent.futures import ThreadPoolExecutor; tpe...
Opengraph URL: https://github.com/python/cpython/pull/102025
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:6b526cc7-16ee-77f6-2143-3b77bf647a2c |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | DC78:38004D:D77E9:11F887:6969BB2C |
| html-safe-nonce | c322d4e60e83dfa2aa52cf42117904e596c319d784dbf184d784fb5b9ce86228 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQzc4OjM4MDA0RDpENzdFOToxMUY4ODc6Njk2OUJCMkMiLCJ2aXNpdG9yX2lkIjoiMjE4Mjg4ODQ3ODIzMzcwNTI2MCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 0f50a673e4611881c4478b383d7532dc715fae060b10e3063c098b829ebed0f0 |
| hovercard-subject-tag | pull_request:1245964816 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/python/cpython/pull/102025/files |
| twitter:image | https://avatars.githubusercontent.com/u/1056154?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/1056154?s=400&v=4 |
| og:image:alt | _idle_semaphore.release() is called if only work_queue is empty Benchmarks: submit_only: ./python -m timeit -n 100000 -r 10 -s 'W = 1; from concurrent.futures import ThreadPoolExecutor; tpe = T... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | acedec8b5f975d9e3d494ddd8f949b0b8a0de59d393901e26f73df9dcba80056 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 83c08c21cdda978090dc44364b71aa5bc6dcea79 |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width