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.

有帮助吗?

解决方案

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 :)

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top