On 10 Apr 2007 11:07:51 -0700, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > On 26 Mar., 18:08, [EMAIL PROTECTED] wrote: > > you know the pid, you can kill it, but that's not always a > > clean way of accomplishing the task. > > So I have to open the connection in a new process... Sigh.. How I hate > this part of Python. >
This isn't a python problem. You can't cleanly or safely kill threads, period. If you have to use blocking functions like this (you don't, you might consider using Twisted for your networking instead) the way you "cancel" it is to just stop waiting for the response and discard the response (or error) when it eventually comes. > -- > http://mail.python.org/mailman/listinfo/python-list > -- http://mail.python.org/mailman/listinfo/python-list