Wrt. threadlocal by default: shared module constructors
Brad Roberts
braddr at bellevue.puremagic.com
Wed May 13 18:31:57 PDT 2009
On Wed, 13 May 2009, Christopher Wright wrote:
> Brad Roberts wrote:
> > An interesting side effect of these changes is that thread startup cost is
> > going to increase. Yet more reasons to avoid globals and global
> > initialization.
> >
> > -- Brad
>
> It'll further promote use of threadpools. This isn't terribly safe because the
> globals for that thread are left in some arbitrary state -- yet more reason to
> avoid globals.
Which argues for the globals to be immutable, so the cost goes away and
we're back where we started. :)
(this is fun.. who's next?)
-- Brad
More information about the Digitalmars-d
mailing list