File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change 1212
1313@interface QNNQue ()
1414
15- +(instancetype )sharedInstance ;
15+ + (instancetype )sharedInstance ;
1616
1717@property (nonatomic ) dispatch_queue_t que;
1818
1919@end
2020
2121@implementation QNNQue
2222
23- +(instancetype )sharedInstance {
23+ + (instancetype )sharedInstance {
2424 static QNNQue *sharedInstance = nil ;
25-
25+
2626 static dispatch_once_t onceToken;
2727 dispatch_once (&onceToken, ^{
2828 sharedInstance = [[self alloc ] init ];
2929 });
30-
30+
3131 return sharedInstance;
3232}
33- -(instancetype )init {
33+ - (instancetype )init {
3434 if (self = [super init ]) {
3535 _que = dispatch_queue_create (" qnn_que_serial" , DISPATCH_QUEUE_SERIAL);
3636 }
3737 return self;
3838}
3939
40- + (void )async_run_serial : (dispatch_block_t )block {
40+ + (void )async_run_serial : (dispatch_block_t )block {
4141 dispatch_async ([QNNQue sharedInstance ].que , ^{
4242 block ();
4343 });
4444}
4545
46- + (void )async_run_main : (dispatch_block_t )block {
46+ + (void )async_run_main : (dispatch_block_t )block {
4747 dispatch_async (dispatch_get_main_queue (), block);
4848}
4949
Original file line number Diff line number Diff line change @@ -190,7 +190,7 @@ - (void)run {
190190 if (-1 == fcntl (recv_sock, F_SETFL, O_NONBLOCK)) {
191191 NSLog (@" fcntl socket error!" );
192192 if (_complete != nil ) {
193- [QNNQue async_run_main: ^(void ) {
193+ [QNNQue async_run_main: ^(void ) {
194194 QNNTraceRouteResult* result = [[QNNTraceRouteResult alloc ] init: -1 ip: [NSString stringWithUTF8String: inet_ntoa (addr.sin_addr)] content: nil ];
195195 _complete (result);
196196 }];
You can’t perform that action at this time.
0 commit comments