|
Boost Users : |
From: Daniel Krügler (dsp_at_[hidden])
Date: 2006-07-17 06:40:45
Peter Dimov wrote:
> TLS indices are per-process, and since the TLS index used by the cleanup
> code cannot be cleaned before process exit, it doesn't matter whether there
> is an explicit TlsFree. When the process dies, so will all its TLS indices.
>
> I could have put a TlsFree in on_process_exit, but it's better not to. If
> on_process_exit is (for some reason) called before all on_thread_exits, the
> cleanup handlers won't have a chance to execute and will leak.
Thank you very much for your careful explanation, Peter!
Given the advantages of *more* simplicity and *less* warnings by
often-used tools, wouldn't it be appropriate to use this code as actual
implementation of Boost.Thread?
Greetings from Bremen,
Daniel
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net