Boost logo

Threads-Devel :

Subject: [Threads-devel] catching thread_interrupted
From: Scott Bailey (Bailey_at_[hidden])
Date: 2010-02-03 18:13:10


Here is the setup:

MyCommon.so
- this lib contains some basic classes, one of which (baseTRx) has a
boost::thread.
- this lib includes boost_system and boost_thread using the --whole-archive
flag (linux) and equivalent for darwin and win
     - this was done to minimize the number of files the customer would
receive, among other reasons...
MyTRx.so
- this lib contains a class derived from baseTRx (myTRx).
- links to MyCommon
MyEXE
- this contains main.
- links to MyCommon
- loads MyTRx at run time.
- creates an instance od myTRx.
- signals MyEXE (via interupt()) when its time to cleanly shut down

Using GCC 4.2 w/ -fvisibility=hidden, thread_interrupted isn't being caught
in myTRx since it's being thrown from a different so w/ hidden visibility.

The fix for this is:
    #define BOOST_THREAD_DECL __attribute__ ((visibility("default")))
when gcc has visibility.

Am I correct? If so, I'll write the defect and work on the patch....

If I'm wrong, what am I doing wrong: what should I do different?

-- 
Scott Bailey


Threads-Devel list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk