-
Notifications
You must be signed in to change notification settings - Fork 2
Comparison table
DigitalBrainJS edited this page Oct 17, 2021
·
1 revision
CPromise | BlueBird.js | p-cancelable | |
---|---|---|---|
.cancel() is synchronous |
❌* (.cancel emits a cancel signal synchronously, but the cancellation is asynchronous) | ✓ | ✓ |
No setup code required to make cancellation work | ✓ | ✓ | ✓ |
Cancellation type | asynchronous, rejection with CanceledError follows the special algorithm |
synchronous (ignoring attached callbacks) | synchronous (ignoring attached callbacks) / asynchronous (rejecting) |
onCancel handler to clean up internal tasks | ✓ | ✓ | ✓ |
Atomic sub-chains (protected from cancellation by upper chains) | ✓ | ❌ | ❌ |
Cancellation flows | ✓ | ❌ | ❌ |
Custom cancellation reasons | ✓ | ❌ | ✓ |
Cancellation composes with other own features, like .all , .race , .allSettled
|
✓ | ✓ | ❌ |
Chaining/nested promise cancellation support | ✓ | ✓ | ❌ |
Generators support for “flat” coroutines (as a functional replacement for ECMA async functions) | ✓ | ✓ | ❌ |
Coroutines cancellation | ✓ | ❌ | ❌ |
Concurrency limitation | ✓ | ✓ | ❌ |
Signals/data flows | ✓ | ❌ | ❌ |
Chain progress capturing | ✓ | ❌ | ❌ |
Pause/resume support | ✓ | ❌ | ❌ |
timeouts | ✓ | ✓ | ❌ |
AbortController support (outer/inner) | ✓/✓ | ❌ | ❌ |
.catch errors filter |
✓ | ✓ | ❌ |
.delay helper |
✓ | ✓ | ❌ |
ECMA decorators for methods (legacy/current) | ✓/✓ | ❌ | ❌ |
Inherited from the native Promise | ✓ | ❌ | ❌ |