Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
kaisukez committed Oct 31, 2021
1 parent bf638e0 commit 1f067ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ I copied some code from https://github.com/conradreuter/cancellationtoken which
I also added some useful features that [conradreuter/cancellationtoken](https://github.com/conradreuter/cancellationtoken) doesn't have such as
- `new CancellationToken(cancel => {})` [Revealing Constructor Pattern](https://github.com/tc39/proposal-cancelable-promises/blob/0e769fda8e16bff0feffe964fddc43dcd86668ba/Cancel%20Tokens.md#for-the-creator) (from the withdrawn proposal)
- `await CancellationError.ignoreAsync(() => promise)` (to ignore CancellationError in one line without using try-catch)
- `SyncCheckpoint.before(token, () => yourFunction())` (to throw CancellationError if the specified token is already cancelled before running function, in one line)
- `AyncCheckpoint.after(token, () => yourFunction())` (to throw CancellationError if the specified token is already cancelled before running function, in one line)
- `await cancel()` async cancel function (so that you can wait all async onCancel functions to finish before you can move on)

## Installation
Expand Down

0 comments on commit 1f067ef

Please sign in to comment.