Draft: Cancellation of FSReq
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
documentation is changed or added -
commit message follows commit guidelines
Draft for early feedback. This adds a cancel()
method accessible from JS to FSReqBase
which calls uv_cancel()
via ReqWrap::Cancel()
on the request. This would be a prerequisite for effectively integrating support for AbortController into the fs
APIs (#31971 (closed)).
Looking for feedback on the approach, if that seems sound then I will write tests and documentation.
To see how this is used in my experiments with cancellation, see https://github.com/nodejs/node/compare/master...ptomato:31971-abortcontroller?expand=1