Domanda

Possible Duplicate:
Understanding NSRunLoop

Till now I know that every thread has its own runloop I don't know whether I'm thinking right. I don't have a brief idea about nsrunloop but I'd like to know what is nsrunloop and what it's purpose and why all the thread has its own runloop(if I'm right). Please help me to let me know about nsrunloop.

È stato utile?

Soluzione

a runloop is basically an extended while loop that works like C select call.

it is responsible for getting events from its sources and dispatching those. mouse clicks, window moves, timers, stream events, ...... anything can be a runloop source.

thats the gist. read more about it in the countless dupes this has on SO or in the apple docs :)

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top