`

使用及关闭线程

 
阅读更多
-(void)startRtsp{
    
    //    [self performSelectorInBackground:@selector(lanzado) withObject:nil];
    thread = [[NSThread alloc]initWithTarget:self selector:@selector(lanzado) object:nil];
    [thread start];
    
}

-(void)stopRtsp{

    [session teardown];
    
    
    [thread cancel];
    
    if ([[NSThread currentThread] isCancelled]) {
                                //clean up 
        [NSThread exit];
    }
    

}
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics