8 Jan
2004
8 Jan
'04
6 p.m.
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