|
Boost : |
From: Tanguy Fautre (tanguy.fautre_at_[hidden])
Date: 2007-03-02 06:11:45
Steven Watanabe wrote:
> AMDG
>
> Philippe Vaucher <philippe.vaucher <at> gmail.com> writes:
>
>>> The point is, the 'threads of execution' don't 'receive the message', as
>>> the 'slot()' methods are executed in the main thread.
>> Right good point.
>>
>> I think the signal's documentation should state that it has the basic thread
>> safety, like one thread manipulating one signal is ok.
>>
>>
>>
>
> it isn't ok.
>
> boost/function/function_template.hpp lines 653-659
>
> template<typename Functor>
> void assign_to(Functor f)
> {
> static vtable_type stored_vtable(f);
> if (stored_vtable.assign_to(f, functor)) vtable = &stored_vtable;
> else vtable = 0;
> }
>
> function static is not thread safe
This was not present in 1.33.1.
If Boost.Function 1.33.1 is thread-safe but 1.34 is not, I would
consider this as a *serious* regression.
I know this could be a big change, but I strongly suggest that
Boost.Function remains thread-safe in 1.34.
PS: the vtable change comes from: revision 1.84, Fri Dec 30 02:31:51
2005 UTC.
Tanguy
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk