开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜