On Sat, Oct 18, 2008 at 03:06:45PM -0300, Martin Conte Mac Donell wrote:
t.start()
time.sleep(2000000)
raise Exception("Why?")
Exception is raised when i resize my xterm window. For some reason
this action breaks time.sleep.
That's the way signals + threads work on a POSIX system. Signals from
other processes are delivered to a single, arbitrarily chosen thread
(see POSIX 2.4.1, "Signal Generation and Delivery" [2]). In your case
the main thread was chosen (but you cannot rely on that).
In the thread handling the signal the currently executed OS function
will usually abort and return with EINTR.
See also Entry #10 of the comp.programming.threads FAQ [1]. [1] http://www.faqs.org/faqs/threads-faq/part1/[2] http://www.opengroup.org/onlinepubs/009695399/functions/xsh_chap02_04.html
CU Sascha -- http://sascha.silbe.org/ http://www.infra-silbe.de/
signature.asc
Description: Digital signature
_______________________________________________ Urwid mailing list [email protected] http://lists.excess.org/mailman/listinfo/urwid
