Boost logo

Boost :

From: Steven Watanabe (steven_at_[hidden])
Date: 2007-03-01 14:32:33


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

In Christ,
Steven Watanabe


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk