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-September/028665.html below:

Two random and nearly unrelated ideas)

[Python-Dev] Re: Signal-resistant code (was: Two random and nearly unrelated ideas) [Python-Dev] Re: Signal-resistant code (was: Two random and nearly unrelated ideas)Zack Weinberg zack@codesourcery.com
Fri, 6 Sep 2002 10:28:03 -0700
On Fri, Sep 06, 2002 at 07:54:49PM +0300, Oren Tirosh wrote:
> Signal handlers and locks don't mix well. A signal handler can't grab a
> lock. The signal handler can't wait for the lock to be released because
> it has interrupted the code holding it. The traditional way this has been
> handled is with a global "interrupt enable" flag.  Just like the good old
> days of 8 bit micros and DOS when any application could clear the
> interrupt flag :-)
> 
> If Queue.Queue sets up a signal critical section as well as getting the
> queue lock a signal could write to a Queue and wake up a thread waiting
> on the other end.

Would this be an appropriate place to complain about how
KeyboardInterrupt won't wake up a thread stuck waiting on a Queue?

zw



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