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/2002-March/021407.html below:

[Python-Dev] POSIX thread code

[Python-Dev] POSIX thread codeAahz aahz@pythoncraft.com
Mon, 18 Mar 2002 18:02:59 -0500
On Mon, Mar 18, 2002, Guido van Rossum wrote:
>
> Yeah, unfortunately the only implementation technique I have to offer
> right now is to turn all acquire calls internally into a loop around
> an acquire call with a timeout in the order of 1 second, and to check
> signals each time around the loop. :-(

-1

The problem with this is that you really start tying yourself in knots.
If you do a time.sleep() for one second, that can't be interrupted for a
full second, either on keyboard interrupt or on releasing the lock.  The
finer-grained you go on time.sleep(), the more overhead you consume, and
the coarser-grained you go, the more you limit throughput.

I'm not aware of any good cross-platform technique for managing thread
timeouts that is also "live".
-- 
Aahz (aahz@pythoncraft.com)           <*>         http://www.pythoncraft.com/

The best way to get information on Usenet is not to ask a question, but
to post the wrong information.  --Aahz



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