YYAsyncLayer
                                
                                 YYAsyncLayer copied to clipboard
                                
                                    YYAsyncLayer copied to clipboard
                            
                            
                            
                        关于最大线程数
define MAX_QUEUE_COUNT 32
    case NSQualityOfServiceUserInteractive: {
        static dispatch_once_t onceToken;
        dispatch_once(&onceToken, ^{
            int count = (int)[NSProcessInfo processInfo].activeProcessorCount;
            count = count < 1 ? 1 : count > MAX_QUEUE_COUNT ? MAX_QUEUE_COUNT : count;
            context[0] = YYDispatchContextCreate("com.ibireme.yykit.user-interactive", count, qos);
        });
        return context[0];
    } break;
关于这段代码,有些疑问向您请教,比如iPhone6,返回count等于2,那么五种不同QOS类型,最多只会产生5*2=10个queues,不知道我的理解是否正确,这个最大值32的意义何在?
这里只是给每个 poll 内的 queue 给一个上限值,并没有什么特殊含义。 除非在 有 32 线程以上的 CPU 上跑(双路至强E5?),不然这个值用不到。