Jon Ribbens <jon+use...@unequivocal.eu>:

> Yes, what I was interested to learn was how the monitoring thread can
> "cut off" the requesting thread.

In general, that cannot be done. Often, you resort to a dirty trick
whereby the monitoring thread closes the I/O object requesting thread is
waiting on, triggering an immediate I/O exception in the requesting
thread.

The fact that threads cannot be terminated at will is one of the big
drawbacks of the multithreaded programming model. Note that coroutines
can always be interrupted at await.


Marko
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to