os_unfair_lock 与pthread_mutex(普通锁,递归锁,条件锁)与(NSLock,NSRecursiveLock,NSCondition,NSConditionLock)
os_unfair_lockos_unfair_lock用于取代不安全的OSSpinLock,从iOS10开始才支持.从底层调用看,等待os_unfair_lock锁的线程会处于休眠状态,并非忙等使用时需要导入头文件#import//初始化os_unfair_locklock=OS_UNFAIR_LOCK_INIT;//尝试加锁os_unfair_lock_trylock(&lock);//加锁o