python's threading has no "interrupt"?
joconnor at cybermesa.com
Tue Dec 2 18:55:53 CET 2003
Dennis Lee Bieber wrote:
> There's the first point of departure: Python threads (as long as you
>aren't in a C language number crunching extension) are preemptive
>scheduled, on something like a 10-20 byte-code interval. Cooperative
>basically means /you/ had to handle the scheduling of threads; in
>Python you don't, it happens automatically.
I stand corrected. The following code behaves exactly like I would want
it to rather than how I feared it would. Is this a change? I don't
seem to recall the same result when I tried it initially with Python
from threading import Thread
t1 = Thread (target=test1)
t2= Thread (target=test2)
More information about the Python-list