Boost logo

Boost :

Subject: Re: [boost] [threads] making parts of Boost.Threads header-only
From: Anthony Williams (anthony.ajw_at_[hidden])
Date: 2009-04-08 05:30:00

Andrey Semashev <andrey.semashev_at_[hidden]> writes:

> Anthony Williams wrote:
>> In any case, after further thought I remembered the reason I didn't do
>> this before. If the exceptions are header-only then they cannot be
>> thrown from a DLL and caught outside the DLL, since the type-ids won't
>> match. This would mean that any exceptions thrown by the DLL version of
>> boost.thread wouldn't be able to be caught in user code other than by
>> catching std::exception or with catch(...). This is the case for
>> MSVC/Windows anyway --- I'm not sure about other compilers/platforms.
> Is it so? On which MSVC version? I'm asking because I throw/catch
> exceptions across dll boundaries all the time on Windows and haven't
> had any problems yet. There are some issues on Linux, but they are
> solved (more or less) with visibility tunings.

Hmm. I'll have to try it out when I get a chance. Maybe I'm mistaken,
but that's certainly my recollection.

If everything does work then that hurdle is removed.


Author of C++ Concurrency in Action |
just::thread C++0x thread library   |
Just Software Solutions Ltd         |
15 Carrallack Mews, St Just, Cornwall, TR19 7UL, UK. Company No. 5478976

Boost list run by bdawes at, gregod at, cpdaniel at, john at