-
Notifications
You must be signed in to change notification settings - Fork 15
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
Abort handling #82
base: bencmbrook/jsbi
Are you sure you want to change the base?
Abort handling #82
Conversation
const outputWritable = getOutputWritable({ long: true }); | ||
|
||
try { | ||
const promise = readable.pipeTo(outputWritable); |
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.
const promise = readable.pipeTo(outputWritable); | |
const controller = new AbortController(); | |
const { signal } = controller; | |
const promise = readable.pipeTo(outputWritable, { signal }); | |
controller.abort(); |
I think our abortion semantics should use AbortController
, so you can pass in signal
here.
https://developer.mozilla.org/en-US/docs/Web/API/AbortController Haven't used this before. Looks good though. Does this change the implementation (given our class extends |
This will change our implementation and also add an additional API surface to for API consumers to input an AbortController (probably during conflux.Writer instantiation). |
@eligrey given transcend-io/penumbra#148 are there any changes required to Conflux for abort handling? |
It doesn't seem like it's actually necessary to expose an explicit AbortController in Conflux with Penumbra's wrapper. |
This bug wasn't caught by tests.
This PR is currently in the test-writing stage, not bugfix. Closes #56