python's threading has no "interrupt"?

Jane Austine janeaustine50 at hotmail.com
Fri Nov 28 09:11:10 EST 2003


As far as I know python's threading module models after Java's.
However, I can't find something equivalent to Java's interrupt and
isInterrupted methods, along with InterruptedException.
"somethread.interrupt()" will wake somethread up when it's in
sleeping/waiting state.

Is there any way of doing this with python's thread? I suppose thread
interrupt is a very primitive functionality for stopping a blocked
thread.

Jane




More information about the Python-list mailing list