[IronPython] threading.thread sometimes forced termination!
Dino Viehland
dinov at microsoft.com
Mon Feb 8 19:16:37 CET 2010
Is there anything in your program that would introduce a .NET thread
abort exception or a Python KeyboardInterrupt?
> -----Original Message-----
> From: users-bounces at lists.ironpython.com [mailto:users-
> bounces at lists.ironpython.com] On Behalf Of KATO Kanryu
> Sent: Monday, February 08, 2010 1:01 AM
> To: users at lists.ironpython.com
> Subject: [IronPython] threading.thread sometimes forced termination!
>
> Hi,
>
> I'm developping multithread application with threading.thread class.
> But sometimes the thread terminates suddenly without any exeption.
> What countermeasure for this problem?
>
> -----------sample code---------------
> import threading
>
> class MyThread(threading.Thread):
> def __init__(self):
> pass
>
> def run(self):
> print "begin thread!"
> try:
> # some codes...
> pass
> except: # not called this point :(
> print "catched something!"
> finally:
> print "end MyThread"
>
>
> mythread = MyThread()
> mythread.start()
> ----------console------------------
> begin thread!
> ...
> end MyThread
> ----------console------------------
>
>
> KATO Kanryu
> _______________________________________________
> Users mailing list
> Users at lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
More information about the Ironpython-users
mailing list