what happens function stack memory and control of the function from where you invoke the signal
A quick question as to what happens to the local function while, if you are binding some other function to a local function, the called function is still running. Is the signal-invoker waiting for the later function to finish to res开发者_如何学Pythonume control? e.g.
//if we have a signal declared as :
typedef boost::signal0<void> SendAbortSignal;
SendAbortSignal CallAbortFunction;
void Func1() {
....
if(SomethingWentBad) {
CallAbortFunction();
//do local clean ups // What will happen here.. will we wait for the signalled function to complete
}
.....
}
Thanks.
I'm not sure I understand your question. Triggering the signal (CallAbortFunction
) will sequentially call every slot, then return (your local clean ups won't run concurrently). It is essentially identical to iterating over a sequence of functions and calling them one after another.
精彩评论