|
Boost : |
From: williamkempf_at_[hidden]
Date: 2001-11-13 09:18:42
--- In boost_at_y..., "Peter Dimov" <pdimov_at_m...> wrote:
> From: <williamkempf_at_h...>
> > --- In boost_at_y..., "Peter Dimov" <pdimov_at_m...> wrote:
> > > I think that statically linking Boost.Threads into a DLL is
quite
> > dangerous.
> >
> > I'd love to hear precise reasons why.
>
> From my cursory inspection it appears that currently Boost.Threads
can be
> linked statically. A later iteration may stumble into the problem
that I had
> in mind but the current code is safe since it doesn't keep any per-
thread
> state.
If by "per-thread state" you mean TLS slots, yes it does. A TLS slot
is allocated for cleanup handlers in tss.cpp on Win32. Again,
though, I see nothing documented that says calls to TlsAlloc/TlsFree
have problems crossing DLL boundaries, and these methods are part of
the Win32 API not the RTL so should be totally unaffected by the
linkage option chosen for the RTL. Or am I missing something
important?
Bill Kempf
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk