dispatch_async block on main queue is never execeuted

前端 未结 3 1330
一整个雨季
一整个雨季 2021-02-12 23:12

I have an app that uses a connection queue that handles the connections on a background thread. Each connection sends a JSON post, then when it receives a success, saves some o

3条回答
  •  一向
    一向 (楼主)
    2021-02-13 00:14

    If your main thread is busy with modal runloop, then you could try

    CFRunLoopPerformBlock(CFRunLoopGetMain(), kCFRunLoopCommonModes, block
        });
    

提交回复
热议问题