what does "__workq_kernreturn" indicate in an iOS crash log or when you pause execution of an app? what does "__workq_kernreturn" indicate in an iOS crash log or when you pause execution of an app? unix unix

what does "__workq_kernreturn" indicate in an iOS crash log or when you pause execution of an app?


It's nothing to worry about unless there are lots of them. If there are lots, that suggests you may be spawning more threads than you probably should, but the workq_kernreturn is still not a problem itself. It usually means that the thread is finishing. The source for it is available at opensource.apple.com if you want to take a look at what it does.

The most common stack you're probably looking at is this one:

_workq_kernreturn_pthread_wqthreadstart_wqthread

Because of optimizations, you don't see the call to _pthread_workq_return() in there, but that's what's actually happening. _workq_kernreturn is just waiting for for the spinlock to finish so it can run the next thing on its queue (or exit).