forked from alibaba/coobjc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(CODispatch): fix crash when co_launch in backgroundThread
fix crash when co_launch in backgroundThread fix alibaba#60
- Loading branch information
1 parent
b15bcc4
commit 80b2a3d
Showing
9 changed files
with
555 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
// | ||
// CODispatch.h | ||
// cocore | ||
// | ||
// Created by 彭 玉堂 on 2019/3/28. | ||
// Copyright © 2019 Alibaba lnc. All rights reserved. | ||
// | ||
|
||
#import <Foundation/Foundation.h> | ||
|
||
@interface CODispatchTimer : NSObject | ||
|
||
@property (nonatomic, strong) dispatch_block_t block; | ||
|
||
- (void)invalidate; | ||
|
||
@end | ||
|
||
|
||
|
||
|
||
NS_ASSUME_NONNULL_BEGIN | ||
|
||
@interface CODispatch : NSObject | ||
|
||
+ (instancetype)currentDispatch; | ||
|
||
- (BOOL)isCurrentDispatch; | ||
|
||
- (void)dispatch_block:(dispatch_block_t)block; | ||
|
||
- (void)dispatch_async_block:(dispatch_block_t)block; | ||
|
||
|
||
- (CODispatchTimer*)dispatch_timer:(dispatch_block_t)block | ||
interval:(NSTimeInterval)interval; | ||
|
||
- (BOOL)isEqualToDipatch:(CODispatch*)dispatch; | ||
|
||
@end | ||
|
||
NS_ASSUME_NONNULL_END |
Oops, something went wrong.