Open jasenhuang opened 7 years ago
why PTUSBHub hard code api that connectToDevice in main queue?
- (void)connectToDevice:(NSNumber*)deviceID port:(int)port onStart:(void(^)(NSError*, dispatch_io_t))onStart onEnd:(void(^)(NSError*))onEnd { PTUSBChannel *channel = [PTUSBChannel new]; NSError *error = nil; //open main queue ? if (![channel openOnQueue:dispatch_get_main_queue() error:&error onEnd:onEnd]) { onStart(error, nil); return; } // .... }
why PTUSBHub hard code api that connectToDevice in main queue?