When is a Cocoa callback given controll?
Posted
by Kaspa
on Stack Overflow
See other posts from Stack Overflow
or by Kaspa
Published on 2009-12-05T15:26:52Z
Indexed on
2010/04/07
5:43 UTC
Read the original article
Hit count: 170
Hi,
I've been searching around the web for an answer to this one, but was unable to find an answer, on the other side I think it's something quite common thus there is a possibility I'm missing some keywords here. Anyhow, the problem is as follows:
When is control given to a callback function in ObjC (iPhone)?
Does it happen after control is given to a high up in the hierarchy class responsible for the runloop? Can it occur in the middle of another function call being executed?
As an example, let's take the NSURLConnection, we don't know or can't predict when it's going to call didReceiveResponse or the other callback methods, can it be the case that didReceiveResponse get's called when I'm in the middle of another function? (highly doubt that but was unable to find information on callbacks wating for the end of the run loop)
Cheers, Kaspa
© Stack Overflow or respective owner