You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Reduce _idle_semaphore calls in ThreadPoolExecutor #102024
In concurrent.futures.thread.ThredPoolExecutor method executor._idle_semaphore.release() should be called if only work queue is empty
Pitch
Currently _idle_semaphore.release() is called after processing every item in queue. That produces useless semaphore updates in case when queue still has items to process.
The optimization is going to increase processing speed of work queue.
Activity
[-]Reduce IDLE semaphore calls[/-][+]Reduce IDLE semaphore calls in ThreadPoolExecutor[/+][-]Reduce IDLE semaphore calls in ThreadPoolExecutor[/-][+]Reduce _idle_semaphore calls in ThreadPoolExecutor[/+]terryjreedy commentedon Feb 18, 2023
'IDLE' (capitalized) is the IDE that comes with CPython; it has nothing to do with inactivity ;-).
gh-102024: Reduced _idle_semaphore.release calls (#102025)
pythongh-102024: Reduced _idle_semaphore.release calls (pythonGH-102025)
gpshead commentedon May 26, 2023
thanks!
[3.12] gh-102024: Reduced _idle_semaphore.release calls (GH-102025) (#…