多线程 一.两种锁: 互斥锁与自旋锁区别 二.线程安全的解决方案 @synchronized NSLock OSSpinLock GCD semaphore GCD serial queue pthread mutex