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

  • 相关阅读:
    C# 加载 SQLite DLL问题
    Linux chroot 并使用之前系统设备节点
    I.MX6 initramfs.cpio.gz.uboot unpack
    I.MX6 eMMC 添加分区
    Git 一次性 pull push 所有的分支
    ARM compiler No such file or directory
    Linux sed 替换第一次出现的字符串
    C# WinForm 应用程序 开启Console窗口
    No 'Access-Control-Allow-Origin' header is present on the requested resource.
    C# 集合已修改;可能无法执行枚举操作
  • 原文地址:https://www.cnblogs.com/javastart/p/8085329.html
Copyright © 2011-2022 走看看