Here is the things I need to do…
-(unsigned int)doSomething
{
msg_id++;
//something need to be done after returning
//process
return msg_id;
}
[somebody doSomething];
Now the process is like this:
somebodycalleddoSomething- Process is executed
- Msg id is returned
The flow I wanna:
somebodycalleddoSomething- Msg id is returned
- Process is executed
You can ask me to do when somebody doSomething is finished, but I can’t change this part. I can only change the doSomething method. Also, some workaround suggestions is calling a delay after X seconds. But I concern the after delay X second. Because I don’t know return msg_id need how many second, actually.
Any better suggestion?
CS101.
return, does just that. It returns. Perhaps, you want ‘process’ to be something that is done in the background, or on a separate thread? You might be looking at this then:In any case, I think you need to rethink your logic.