A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2006-March/062391.html below:

[Python-Dev] Another threading idea

[Python-Dev] Another threading idea [Python-Dev] Another threading ideaRaymond Hettinger raymond.hettinger at verizon.net
Tue Mar 14 23:33:19 CET 2006
> Isn't this a job for threading.BoundedSpemaphore()?

I don't see how that would work.  ISTM that we need an inverse of a 
BoundedSemaphore.  If it understand it correctly, a BS blocks after some pre-set 
maximum number of acquires and is used for resources with limited capacity (i.e. 
a number of connections that can be served).  With the TaskQueue, there is no 
pre-set number, the queue can grow to any size, and the join() method will block 
until the counter falls back to zero.  IOW, a BS is about potentially blocking 
new requests and a TaskQueue is about blocking other work until outstanding 
requests are complete.


Raymond




More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4