-
Notifications
You must be signed in to change notification settings - Fork 346
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: RPC: add useAbortSignal option #731
Conversation
Remove some unused variables triggering "unused variable" warnings. Signed-off-by: Christian Stewart <christian@paral.in>
Currently adds 1 patch for the following pending PR: - stephenh/ts-proto#730 - stephenh/ts-proto#731 Signed-off-by: Christian Stewart <christian@paral.in>
b80126f
to
b1b5254
Compare
Currently adds 1 patch for the following pending PR: - stephenh/ts-proto#730 - stephenh/ts-proto#731 Signed-off-by: Christian Stewart <christian@paral.in>
b1b5254
to
fe4fabd
Compare
Currently adds 1 patch for the following pending PR: - stephenh/ts-proto#730 - stephenh/ts-proto#731 Signed-off-by: Christian Stewart <christian@paral.in>
Currently adds 1 patch for the following pending PR: - stephenh/ts-proto#730 - stephenh/ts-proto#731 Signed-off-by: Christian Stewart <christian@paral.in>
@stephenh This should be good to go now. I wonder too about passing an AbortSignal on the server side. |
Adds a new option "useAbortSignal" which adds an optional AbortSignal parameter to RPC functions. AbortController and AbortSignal are built-ins in both Node.JS and all web browsers, which implement aborting long-lived processes. For example: const abortController = new AbortController() const responsePromise = rpcClient.DoSomething(request, abortController.signal) // abort the RPC call early abortController.abort() Fixes stephenh#730 Signed-off-by: Christian Stewart <christian@paral.in>
fe4fabd
to
f51c0d9
Compare
Currently adds 1 patch for the following pending PR: - stephenh/ts-proto#730 - stephenh/ts-proto#731 Signed-off-by: Christian Stewart <christian@paral.in>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! Thanks @paralin !
I still haven't had a reason to use abort signals, so am not an expert, but this API seems really straightforward.
🎉 This PR is included in version 1.136.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Currently adds 1 patch for the following pending PR: - stephenh/ts-proto#730 - stephenh/ts-proto#731 Signed-off-by: Christian Stewart <christian@paral.in>
Currently adds 1 patch for the following pending PR: - stephenh/ts-proto#730 - stephenh/ts-proto#731 Signed-off-by: Christian Stewart <christian@paral.in>
Currently adds 1 patch for the following pending PR: - stephenh/ts-proto#730 - stephenh/ts-proto#731 Signed-off-by: Christian Stewart <christian@paral.in>
Adds a new option "useAbortSignal" which adds an optional AbortSignal parameter to RPC functions. AbortController and AbortSignal are built-ins in both Node.JS and all web browsers, which implement aborting long-lived processes.
For example:
Fixes #730