AOP - Aspects

Posted by Genie on August 2, 2019

Aspects 替换OSSpinLockLock 废弃不安全的lock

1
2
3
4
5
6
7
static void aspect_performLocked(dispatch_block_t block) {
    pthread_mutex_t t;
    pthread_mutex_init(&t,NULL);
    pthread_mutex_lock(&t);
    block();
    pthread_mutex_unlock(&t);
}

有问题可以联系Email