Boost logo

Boost Users :

From: Russell Hind (rhind_at_[hidden])
Date: 2004-01-08 13:00:08


Uwe Sander wrote:

> Hi,
>
> I have a problem with boost::signals when I try to use them in multi threaded
> projects. I have tried gcc 3.2.3 and gcc 3.3.2, on two different Linux boxes,
> with the same result. The following test program works fine w/o threads and
> crashes after the 17th call to connect if I add -pthread to the compile
> command:
>

The first pitfall I hit using signals in a multi-threaded environment is
that the signals lib by default (on win32 anyway) builds a single
threaded library, NOT multi-threaded. You have to explicitly force a
multi-threaded build for it using

<threading>multi

as a BUILD option of bjam.

HTH

Russell


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net