Boost logo

Boost :

Subject: Re: [boost] [Block Pointer] multithread help
From: Frank Mori Hess (frank.hess_at_[hidden])
Date: 2011-05-13 10:06:26

On Thursday, May 12, 2011, Phil Bouchard wrote:
> Hi everybody,
> I was wondering if there is anybody familiar enough with Block Pointer
> that could give me a hand regarding multithread support. Once again the
> test file is at:
> thread_test.cpp
> The main class I am trying to protect with a mutex is block_header from:

It looks like you might be affected by the "static initialization order
fiasco". Your test creates a global block_ptr, whose constructor seems to
eventually use some class static boost::mutex. It's not clear that the
constructors for the static boost::mutex will necessarily be run before the
constructor of your global block_ptr.

Boost list run by bdawes at, gregod at, cpdaniel at, john at