QNAsyncRun.m 451 B

12345678910111213141516171819202122
  1. //
  2. // QNAsyncRun.m
  3. // QiniuSDK
  4. //
  5. // Created by bailong on 14/10/17.
  6. // Copyright (c) 2014年 Qiniu. All rights reserved.
  7. //
  8. #import "QNAsyncRun.h"
  9. #import <Foundation/Foundation.h>
  10. void QNAsyncRun(QNRun run) {
  11. dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^(void) {
  12. run();
  13. });
  14. }
  15. void QNAsyncRunInMain(QNRun run) {
  16. dispatch_async(dispatch_get_main_queue(), ^(void) {
  17. run();
  18. });
  19. }