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/028659.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)Neal Norwitz neal@metaslash.com
Fri, 06 Sep 2002 11:36:40 -0400
Guido van Rossum wrote:
> 
> > Could we connect signals to semaphores or locks or something
> > like that? That would allow you to do the two things that i
> > think are worth doing in a signal handler: setting a flag and/or
> > making some other part of the code wake up.
> 
> But that mixes signals with threads, which is even more poorly
> standardized than signals in general.

Python can open a pipe to itself.  When a signal arrives, write
a character on the pipe in addition to setting a flag.  
Then select() on the pipe.

I doubt this is worth the effort, though.

Neal



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