Understand runloop again

runloop is "dead" loop in the thread, the thread to keep alive.

Meanwhile runloop is event-driven, so all events are wrapped inside the main thread in each cycle runloop inside.

 

In short: the app starts, all events take place in the main thread is wrapped in runloop cycle in the main thread, but generally not the child thread, the child thread is usually its own thread executing the function is over unless the child thread to open a separate own runloop.

Guess you like

Origin www.cnblogs.com/yibinpan/p/11894781.html