123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 |
-
-
- #import <Foundation/Foundation.h>
-
- NS_ASSUME_NONNULL_BEGIN
-
- @class OSSTask<ResultType>;
-
-
- @interface OSSTaskCompletionSource<__covariant ResultType> : NSObject
-
-
- + (instancetype)taskCompletionSource;
-
-
- @property (nonatomic, strong, readonly) OSSTask<ResultType> *task;
-
-
- - (void)setResult:(nullable ResultType)result;
-
-
- - (void)setError:(NSError *)error;
-
-
- - (void)setException:(NSException *)exception;
-
-
- - (void)cancel;
-
-
- - (BOOL)trySetResult:(nullable ResultType)result;
-
-
- - (BOOL)trySetError:(NSError *)error;
-
-
- - (BOOL)trySetException:(NSException *)exception;
-
-
- - (BOOL)trySetCancelled;
-
- @end
-
- NS_ASSUME_NONNULL_END
|