dispatch_semaphore_t sema 等待

来源:互联网 发布:海尔网络电视打开蓝屏 编辑:程序博客网 时间:2024/05/29 18:03

dispatch_semaphore_t sema = dispatch_semaphore_create(0);

                                                         dispatch_semaphore_signal(sema);


            dispatch_semaphore_wait(sema,DISPATCH_TIME_FOREVER);

            dispatch_release(sema);


原创粉丝点击