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/2012-January/115952.html below:

[Python-Dev] threading.Semaphore()'s counter can become negative for non-ints

[Python-Dev] threading.Semaphore()'s counter can become negative for non-ints [Python-Dev] threading.Semaphore()'s counter can become negative for non-intsBenjamin Peterson benjamin at python.org
Sat Jan 28 21:07:16 CET 2012
2012/1/28 T.B. <bauertomer at gmail.com>:
> Hello python-dev,
>
> This is probably worth of a bug report: While looking at threading.py I
> noticed that Semaphore's counter can go below zero. This is opposed to the
> docs: "The counter can never go below zero; ...". Just try:
>
> import threading
> s = threading.Semaphore(0.5)

But why would you want to pass a float? It seems like API abuse to me.


-- 
Regards,
Benjamin
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