[bind10-dev] exit from multiple threads python process
Michal 'vorner' Vaner
michal.vaner at nic.cz
Mon Oct 18 12:49:17 UTC 2010
Hello
On Mon, Oct 18, 2010 at 01:57:19PM +0200, Shane Kerr wrote:
> > 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.
>
> For this to be a problem, the main thread would 1) have to know about
> the new thread, and 2) not know that it is a daemon. This is a potential
> problem, but something easily avoided in our software.
I'm not sure. The main thread listed the threads by threading.enumerate(), which
means all threads in current process. Now imagine a library (some, not even
ours) creates a cleanup/watchdog/whatever thread. It doesn't have it's own way
to terminate, but is set as a daemon thread. And we explicitly .join() it.
Another possibility would be ‒ I'm not sure if threading.enumerate() could
include pthreads created from underlaying C/C++ code ‒ I could imagine it might.
Now, if a datasource (for example) has a thread…
I'm not directly opposed to having the bit of code, if you think it is worth to
know when everything terminated, but it just doesn't seem right to me.
Have a nice day
--
Work with computer has 2 phases. First, computer waits for the user to tell it what
to do, then the user waits for the computer to do it. Therefore, computer work
consists mostly of waiting.
Michal 'vorner' Vaner
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <https://lists.isc.org/pipermail/bind10-dev/attachments/20101018/0be282d9/attachment.bin>
More information about the bind10-dev
mailing list