[Python-Dev] Interrupting a thread

Mark Hammond MHammond@skippinet.com.au
Wed, 14 Jul 1999 16:58:25 +1000


> I don't think there's any portable way to do this.  Even
> restricting the
> scope to Windows, forget Python for a moment:  can you do
> this reliably with
> NT threads from C, availing yourself of every trick in the
> SDK?  Not that I

Nope - not if I forget Python.  However, when I restrict myself _to_
Python, I find this nice little ceval.c loop and nice little per-thread
structures - even with nice-looking exception place-holders ;-)

Something tells me that it wont be quite as easy as filling these in (while
you have the lock, of course!), but it certainly seems far more plausible
than if we consider it a C problem :-)

> odd-how-solutions-create-more-problems-than-they-solve-ly y'rs  - tim

Only because they often open your eyes to a whole new class of problem
<wink>.  Continuations/generators/co-routines (even threads themselves!)
would appear to be a good example - for all their power, I shudder to think
at the number of questions they will generate!  If I understand correctly,
it is a recognised deficiency WRT signals and threads - so its all Guido's
fault for adding these damn threads in the first place :-)

just-more-proof-there-is-no-such-thing-as-a-free-lunch-ly,

Mark.