dispatch_semaphore 信号量互斥 解决下个请求用到上个请求中数据的问题

dispatch_queue_t queque = dispatch_queue_create("GoyakodCreated", DISPATCH_QUEUE_CONCURRENT);

dispatch_async(queque, ^{

dispatch_semaphore_t semaphore = dispatch_semaphore_create(0);

[self getToken:semaphore];/*dispatch_semaphore_signal(semaphore)*/

dispatch_semaphore_wait(semaphore, DISPATCH_TIME_FOREVER);

[self request];

});

你可能感兴趣的:(dispatch_semaphore 信号量互斥 解决下个请求用到上个请求中数据的问题)