Boost logo

Boost :

Subject: Re: [boost] [atomic] comments
From: Helge Bahmann (hcb_at_[hidden])
Date: 2011-11-01 15:01:52


> > > GCC has the luxury of a shared runtime which can provide process-wide
> > > table of spinlocks. Boost.Atomic is header-only, so in multi-module
> > > applications this table has to be exported so that all modules use the
> > > single table. I mentioned that in the review. Do you have ideas of how
> > > to achieve that? Most obvious would be to link to Boost.Atomic
> > > dynamically...
> >
> > the same way shared_ptr treats its spinlock pool (template
> > specialization, and I guess this leads to a symbol with virtual linkage,
> > the instances all of which are collapsed into a single instance by the
> > run-time linker)
>
> It doesn't work on Windows. shared_ptr is fine there because it actually
> uses real atomic ops on that platform. IIUC, Boost.Atomic cannot be saved
> by that.

that's a show-stopper indeed and I suspect it means a shared library then :(

Thanks for the heads-up

Best regards
Helge


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk