[bind10-dev] exit from multiple threads python process

Likun Zhang zlkzhy at gmail.com
Mon Oct 18 10:37:55 UTC 2010


Hi all,

There are two ways for exit from multiple threads python process after main
thread sending signal to other non-deamon threads(note, each thread will
catch the terminal signal and exit ).

 

1.       main thread exit first, let python interpreter handle the left
threads.  (vorner suggested)

2.       Main thread wait until all other threads exit by join each thread.
(This the current way xfrout/xfrin used) 

 

The reason mentioned by vorner for the first way is:

 

one, it looks scary

two, if there is a daemon thread (the kind interpretter doesn't wait for)
and it does not terminate by itself, we wait indefinitely. But that's not
what someone starting a daemon thread would expect.

 

I can't say way one is good or bad, I just feel way two be more general and
natural.

 

Any suggestions?

 

Thanks

Likun

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/bind10-dev/attachments/20101018/a81a4eff/attachment.html>


More information about the bind10-dev mailing list