GCD, NSThread, and performSelector:onThread: issues

后端 未结 3 1176
日久生厌
日久生厌 2021-01-23 00:58

I\'m attempting to debug some iOS crash logs that contain the following error message:

*** Terminating app due to uncaught exception \'NSDestinationInvali

3条回答
  •  一生所求
    2021-01-23 01:07

    There is no mapping at all between queues and threads, with the sole exception of the main queue which always runs on the main thread. Any queue which targets the main queue will, of course, also run on the main thread. Any background queue can run on any thread, and can change thread from one block execution to the next. This is equally true for serial queues and for concurrent queues.

    GCD maintains a thread pool which gets used for executing blocks according to the policies determined by the queue to which the block belongs. You are not supposed to know anything about those particular threads.

提交回复
热议问题