How to create custom CFRunLoopRef in iPhone
How to 开发者_C百科create custom CFRunLoopRef in iPhone ?
You don't create them. Instead, each thread has one associated with it, which you can get with CFRunLoopGetCurrent()
. That run loop is going to be inactive on any secondary thread you spawn, so you must start it with CFRunLoopRun()
, which will then block on that secondary thread until it is stopped or until all its timers/sources are unscheduled.
精彩评论