COPromise 的 cancle 调用没有效果。
- Dominant language
- Objective-C
- Stars
- 4k
- Forks
- 519
- PR merge metrics
- No merged PRs in 30d
Description
### 如题,协程的取消Cancle需要怎么使用,目前调用没有效果?
```objc
/**
Cancel the job.
@discussion If you want a `COPromise` be cancellable, you must make the job cancel in `onCancel:`.
*/
- (void)cancel;
/**
Set the onCancelBlock.
@param onCancelBlock will execute on the promise cancelled.
*/
- (void)onCancel:(COPromiseOnCancelBlock _Nullable )onCancelBlock;
```
#### 目前,如下两种方式,均没有效果: cancle 并没被调用,没有日志输出。

Contributor guide
Research direction
Start with the COPromise cancel and onCancel: APIs shown in the issue, then reproduce both reported usage patterns from the attached image. Trace whether cancellation reaches the registered onCancel block and compare the observed behavior with the API discussion; done means the cancellation callback executes as expected or the issue is clarified with a minimal reproducible case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- objective-c
- Domain
- mobile-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100