Boost logo

Boost Users :

From: Setzer, Sebastian (ext) (sebastian.setzer.ext_at_[hidden])
Date: 2006-05-18 11:45:11


 

> > Hi,
> > If you connect (disconnect) a new slot to a signal inside
> of a slot of
> > the same signal, what happens?
> > - are the slots called which where connected before the signal was
> > called,
> > - or is new slot be called this time, too,
> > - or is the behaviour undefined?
> >
> > I didn't find anything on this subject in the manuals. Even if the
> > behaviour is undefined, that should be mentioned.
>
> Doesn't the following answer the questions:
Sorry. I didn't look into the "disconnect" section.

It answers a part of the questions.
It doesn't describe what happens if you connect a slot.
Is the slot not called this time (that would be simplest)?
Or is it called, but only if the slot call group of the slot isn't
"done" already?

>
> http://www.boost.org/doc/html/signals/tutorial.html#id2732772
>
>
> When can disconnections occur? (Intermediate)
> ---------------------------------------------
> ...
>
> These events can occur at any time without disrupting a
> signal's calling
> sequence. If a signal/slot connection is disconnected at any
> time during a
> signal's calling sequence, the calling sequence will still
> continue but will
> not invoke the disconnected slot. Additionally, a signal may
> be destroyed
> while it is in a calling sequence, and which case it will
> complete its slot
> call sequence but may not be accessed directly.
>
> Signals may be invoked recursively (e.g., a signal A calls a
> slot B that
> invokes signal A...). The disconnection behavior does not
> change in the
> recursive case, except that the slot calling sequence
> includes slot calls
> for all nested invocations of the signal.
>
> Jeff Flinn
>
>
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net