Comments (2)
However, the AbortController interface is primarily targeted at web requests, and since p-cancelable is useful for a lot more than web requests, it might be worth clarifying that in the readme.
That is not entirely correct. Node.js is adding it to a lot of APIs. The stream
, child_process
, and fs
module supports it now. Yes, AbortController
started as a way to cancel web requests in the browser, since the standard committees could never decide how to add cancellation to promises. However, since there's no better alternative, a lot of projects are adopting it for everything.
I don't plan to deprecate this package, but I also think it's better to standardize on a single thing, and it looks like AbortController
is winning.
from p-cancelable.
TIL:
Node.js is adding it to a lot of APIs. The stream, child_process, and fs module supports it now
Nice, I wasn't aware of that! I have some reading to do.
This just proves Cunningham's Law is correct, once again.
Closing, thanks!
from p-cancelable.
Related Issues (19)
- Decorator
- Pass the onCancel callback as the last parameter instead of the first HOT 1
- Support wrapping an existing promise HOT 8
- React-Native: Error on module init HOT 1
- Polyfill ? HOT 1
- `onCancel` handlers should be called immediately if the promise was cancelled already HOT 8
- Passing cancellation reason to cancel handler HOT 5
- TypeScript types don't work for calling .then on a PCancelable promise HOT 4
- Not compatible with global Bluebird promises HOT 5
- Utility static function to convert executor into a PCancelable HOT 2
- Improve the message error when attaching `onCancel` after the promise settled HOT 1
- Convert abortable Promise-returning functions to cancelable promises
- Node Engine Lock HOT 1
- isCanceled is not set to true when shouldReject is set to false and promise is rejected in onCancel HOT 3
- Willing to add p-signal to the related section? HOT 7
- 【Discussion】Object.setPrototypeOf(PCancelable.prototype, Promise.prototype) HOT 1
- Thenable isn't cancelable anymore HOT 2
- How to use this with p-lazy? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from p-cancelable.