Boost logo

Boost :

From: Jody Hagins (jody-boost-011304_at_[hidden])
Date: 2006-07-26 11:02:01


On Wed, 26 Jul 2006 13:54:43 +0200
"Michael van der Westhuizen" <r1mikey_at_[hidden]> wrote:

> ACE requires you to use multithreading in most cases. I seriously

Having used ACE for many years (including large amounts of current
production software), I can say that this is not the case. It does not
make it EASY, but it is not a requirement either. You can build
anything from ACE with single or multi threading. The problem is that
the configurations are way too complex, and depend on manual settings
for the most part... it SHOULD use configure or the like (they are
working on it... it is getting better).

The real problem is that neither ACE nor boost handle MT issues
appropriately (both end up assuming that all libs handle MT the same
way, without providing much flexibility).

config-macros.h...

# if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0)
# define ACE_MT(X) X
# if !defined (_REENTRANT)
# define _REENTRANT
# endif /* _REENTRANT */
# else
# define ACE_MT(X)
# endif /* ACE_MT_SAFE */

so, if ACE_MT_SAFE is defined, you automatically get _REENTRANT.

and in config-linux.h...

#if !defined (ACE_MT_SAFE)
#define ACE_MT_SAFE 1 // JCEJ 12/22/96
##1 endif

However, if you build with ACE's makefiles, wrapper_macros.GNU checks
the environment to see if threads are enabled for your build, and if you
are not building with threads enabled, it adds the following compiler
flag 'ACE_MT_SAFE=0'

Here, at ATD, we mix BOOST and ACE in just about everything we do.
However, all our code is built using a set of build tools which, in the
end, suck in the ACE configuration makefiles. We build boost, and our
makefiles know how to figure out which variant of boost libraries to
link against, based on the compilation options.

I hope that helps... at least a little '-)


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