Concurrent Queue with GCD? (iOS 4.2.1)

前端 未结 1 2022
遥遥无期
遥遥无期 2021-01-17 19:09

Iam having problems with:

dispatch_queue_t concurrentQueue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0UL);

con

相关标签:
1条回答
  • 2021-01-17 19:48

    It appears DISPATCH_QUEUE_PRIORITY_BACKGROUND is only available for iOS 5.0 and later.

    DISPATCH_QUEUE_PRIORITY_BACKGROUND Items dispatched to the queue run at background priority; the queue is scheduled for execution after all high priority queues have been scheduled and the system runs items on a thread whose priority is set for background status. Such a thread has the lowest priority and any disk I/O is throttled to minimize the impact on the system. Available in iOS 5.0 and later.

    Found here

    In the case the user is running iOS 4 you could go with DISPATCH_QUEUE_PRIORITY_LOW and then use DISPATCH_QUEUE_PRIORITY_BACKGROUND for iOS 5 and later.

    Edit

    The documentation is a little misleading if you don't read it closely in this case.

    enter image description here

    0 讨论(0)
提交回复
热议问题