- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event{
pthread_t pthread;
NSString *name = @"ls";
int result = pthread_create(&pthread, NULL, demo, (__bridge void *)(name));
}
void *demo(void *param) {
NSString *name = (__bridge NSString *)(param);
NSLog(@"hello %@ %@", name, [NSThread currentThread]);
return NULL;
}
複製代碼