• 第15月第22天 libz.dylib


    1.

    1. 3.在弹出的对话框中输入"cmd"+"shift"+"g" 

    2. 4

      4.输入/usr/lib

    https://jingyan.baidu.com/article/624e745959a39934e8ba5abb.html

    2.thread

    #define RunInSeparateThread(...)                                              

        ({                                                                        

            __block __typeof__(__VA_ARGS__) result;                               

            [ACDFTPManagerThread runInSeparateThread:^{                           

                result = (__VA_ARGS__);                                           

            }];                                                                   

            result;                                                               

        })

     

    @implementation ACDFTPManagerThread
    
    + (void)runInSeparateThread:(void (^)(void))block {
        ACDFTPManagerThread *thread = [[ACDFTPManagerThread alloc] init];
        thread.block = block;
        thread->waitCondition = [[NSCondition alloc] init];
    
        [thread->waitCondition lock];
        NSThread *t = [[NSThread alloc] initWithTarget:thread
                                              selector:@selector(threadMain)
                                                object:nil];
        [t start];
        [thread->waitCondition wait];
        [thread->waitCondition unlock];
    }
    
    - (void)threadMain {
        @autoreleasepool {
            self.block();
            [waitCondition broadcast];
        }
    }
    
    @end

    https://github.com/0xwangbo/GetEasy/blob/6770a0be76929962de14891e4b3061654494ac1a/Pods/ACDFTPManager/ACDFTPManager/Classes/ACDFTPManagerThread.m

    https://github.com/search?l=Objective-C&q=main+thread+block&type=Code&utf8=%E2%9C%93

  • 相关阅读:
    CSS 去掉文字选中状态
    解决MAC系统升级导致COCOAPODS失效问题
    qr-mili Tekniskt stöd
    JavaScript 随笔
    Https 单向验证 双向验证
    git 常用指令
    h5或者微信端吊起app
    创建本地服务器环境
    jenkins 关闭和重启的实现
    jenkins 忘记用户名和密码
  • 原文地址:https://www.cnblogs.com/javastart/p/8085329.html
Copyright © 2020-2023  润新知