Вопрос

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