Boost logo

Boost :

From: Gennadiy Rozental (gennadiy.rozental_at_[hidden])
Date: 2005-05-06 16:22:53


> 1. Please state clearly in the Boost.Test documentation that it is not
> thread-safe. I looked all through the pages (both the current release and
> the 1.31 release) but the only place I find mention of thread-unsafety is
> in the Open Issues page. The FAQ page would also be a good place to
> mention Boost.Test thread-unsafety, besides the main page (and places like
> Usage Recommendations, Examples, Compilation, etc).

Ok. Will do.

> 2. Please consider adding thread-safeness to the Boost.Test libraries. I
> know this is not a simple request, and there may be other priorities ...
> but many of my (and my team's) unit tests are multi-threaded, and it's a
> shame to not be able to use Boost.Test (or even know which, if any, parts
> are thread-safe). It's a nice testing framework, IMO. Note that I don't
> need the whole library itself to be threaded, just to be able to do things
> like BOOST_MESSAGE and BOOST_EQUAL within my own testing threads. (I'll
> offer whatever help I can provide, within the constraints of my available
> time.)

While you waiting my recomendation is very simple: wrap Boost.Test test
tools access using your own locks available.

MY_MESSAGE( ... ) \
do { \
   Lock( shared_mutex )\
  BOOST_MESSAGE( ... )\
} while( 0 )\
/**/

MY_CHECK_EQUAL( ... ) \
do { \
   Lock( shared_mutex )\
  BOOST_CHECK_EQUAL( ... )\
} while( 0 )\
/**/

> Many thanks!
>
> Cliff

Gennadiy.


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