zoukankan      html  css  js  c++  java
  • 第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

  • 相关阅读:
    Entity Framework EF6使用 MySql创建数据库异常解决办法
    在c#中使用bitblt显示图片
    百度指数完美采集器
    使用HtmlAgilityPack解析Html(非常好用)
    线程的暂停与继续
    webform 中使用ajax
    OkHttp+Stetho+Chrome调试android网络部分(原创)
    android最佳实践的建议(翻译自android-best-practices)
    Android最流行的网络框架(原创)
    android studio 中配置androidAnnotation 的新版正确配置
  • 原文地址:https://www.cnblogs.com/javastart/p/8085329.html
Copyright © 2011-2022 走看看