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

  • 相关阅读:
    枚举和字符串之间的转换 [转帖]
    escape,encodeURI,encodeURIComponent函数比较[转帖]
    .net中的Provider模式 [转帖]
    ogg转到mp3
    四季养生(樊正伦教授)
    JavaScript高阶之路
    Python初识
    理解error和exception之间的区别(转)
    一些有用的话
    《爱在雨季》片尾曲
  • 原文地址:https://www.cnblogs.com/javastart/p/8085329.html
Copyright © 2011-2022 走看看