FAQ
Using python 2.2,
I am trying to implement fairly stable application in Python that is heavily
relies on threads. There are currently two problems I have with this task.
1. I want to be able, using whatever the threading.get_ident() returns (perhaps),
to determine the state of thread (does it still run or not), and to kill the
thread, in case that it, for example, is waiting for some data from socket whose
network interface has died unexpectedly.
For now I rely on the behavior of linux, where when main thread quits, all its
children threads are also being killed. But to me, it would be nicer to kill them
by hand..
2. I want to process user interrupt (ctrl-c), which does not work at all while
running multiple threads, by setting some event so that main thread would quit.
How do I register handler for this?
btw, are there any signals available on windows, and if yes, where are they
listed?

Search Discussions

Discussion Posts

Previous

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 3 of 3 | next ›
Discussion Overview
grouppython-list @
categoriespython
postedNov 1, '02 at 10:12p
activeNov 2, '02 at 6:29a
posts3
users3
websitepython.org

People

Translate

site design / logo © 2022 Grokbase