On donderdag, september 5, 2002, at 05:01 , Guido van Rossum wrote: >> Code in signal handlers is executed at some arbitrary point in the >> program and the programmer should be aware of this and only do so >> simple things like setting a flag or appending to a list. > > Unfortunately the mechanism doesn't enforce this. I wish we could > invent a Python signal API that only lets you do one of these simple > things. 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. Only problem is that for completeness you would really want to wire up select-like functionality too, so that you could really have a single waiting mechanism. -- - Jack Jansen <Jack.Jansen@oratrix.com> http://www.cwi.nl/~jack - - If I can't dance I don't want to be part of your revolution -- Emma Goldman -
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