创建线程方式-pthread

 pthread

pthread的基本使用(需要包含头文件<ptheard.h>)
    //使用pthread创建线程对象
    pthread_t thread;
    NSString *name = @"daquan";
    //使用pthread创建线程
    //第一个参数:线程对象地址(有两个*即要传入地址)
    //第二个参数:线程属性
    //第三个参数:指向函数的指针
    //第四个参数:传递给该函数的参数
    pthread_create(&thread, NULL, run, (__bridge void *)(name));


原文地址:https://www.cnblogs.com/zhoudaquan/p/5080243.html