diff options
author | Lennart Poettering <lennart@poettering.net> | 2008-10-28 00:21:41 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2008-10-28 00:21:41 +0100 |
commit | a1ec5ccea1b3d4495069df95472b3fbc48d7cde3 (patch) | |
tree | 6bd24240f8851f513f756aaf87b05b6b1e7af853 /doc/Makefile.am | |
parent | 15581560d9f599afa22928f4fb4a558f153072e1 (diff) |
Rework thread shutdown logic
As it turns there were two issues with the current logic how we shut
down the worker threads:
- We asked the threads to shutdown by closing the socket that is
the communication from the context to the worker thread. This is racy
because other threads might allocate the same fd immediately after it
was closed and our worker thread ends up reading from that new fd
under some circumstances.
- To avoid blocking on shutdown we only detached the thread -- not
waiting for its termination. This will cause an immediate segfault
when the libasyncns gets unloaded from memory, e.g. because it was
loaded by DSO.
We have to acknowledge thati we need to make sure all name lookups are
terminated properly on destruction and that there is simply no clean way
to cancel name loops unless they are done out-of-process.
Diffstat (limited to 'doc/Makefile.am')
0 files changed, 0 insertions, 0 deletions