Created
August 3, 2018 19:53
-
-
Save steipete/0b2b806018bd7acb14955f22060b50a6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Works | |
__auto_type queue = dispatch_queue_create("com.pspdfkit.test", DISPATCH_QUEUE_SERIAL); | |
dispatch_set_target_queue(queue, dispatch_get_global_queue(QOS_CLASS_DEFAULT, 0)); | |
// Crashes with EXC_BAD_INSTRUCTION | |
// I guess this fails because the global queues already have an autorelease pool? | |
__auto_type queue2 = dispatch_queue_create("com.pspdfkit.test", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL); | |
dispatch_set_target_queue(queue2, dispatch_get_global_queue(QOS_CLASS_DEFAULT, 0)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment