On Fri, 13 May 2005 16:47:34 +0200, Zunbeltz Izaola <[EMAIL PROTECTED]> wrote:
>On Fri, 13 May 2005 09:10:13 -0400, Peter Hansen wrote:
>
>>
>> How did you intend to stop the thread in a manner which might be unsafe?
>> (Hint, unless you're doing something unusual, you can't.)
>>
>
>I have a threaded object (Mythread). It checks if want_thread
>variable is True to return. The problem is that this object
>execute a function that is a tcp comunication
>

  You cannot exit a thread except by exiting the entire process or by having 
the function it is running terminate (either by returning or raising an 
exception).

  Instead of using threads for network communication, you may want to look into 
these:

    http://www.twistedmatrix.com/

    http://python.org/doc/lib/module-asyncore.html

    http://www.nightmare.com/medusa/

  Hope this helps,

  Jp
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to