You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Would you be open to adding abort support to shell commands?
I have some commands that occasionally get stuck, and it would be useful to be able to cancel them entirely to kill them (by closing the underlying connection, which does seem to kill the running command). I think the standard AbortController would be a good way to do this, I'm imagining an API like:
constcontroller=newAbortController();constsignal=controller.signal;adbClient.shell(command,{ signal });// Later, to abort:controller.abort();// .destroy() on the underlying TCP connection
AbortController is available as a global in v14.17+, so all current Node versions. I can see that in theory this package supports back to Node 0.10, but I think this would be implementable so that it doesn't break anything in older versions, and it's just if you wanted to use this specific feature in older Node you'd need to bring a polyfill.
Would that work for you? I'd be happy to open a PR for this if it's something you'd be interested in.
The text was updated successfully, but these errors were encountered:
Would you be open to adding abort support to shell commands?
I have some commands that occasionally get stuck, and it would be useful to be able to cancel them entirely to kill them (by closing the underlying connection, which does seem to kill the running command). I think the standard AbortController would be a good way to do this, I'm imagining an API like:
This matches the abort behaviour in lots of other JS APIs, e.g. fetch: https://developer.mozilla.org/en-US/docs/Web/API/AbortController#examples.
AbortController is available as a global in v14.17+, so all current Node versions. I can see that in theory this package supports back to Node 0.10, but I think this would be implementable so that it doesn't break anything in older versions, and it's just if you wanted to use this specific feature in older Node you'd need to bring a polyfill.
Would that work for you? I'd be happy to open a PR for this if it's something you'd be interested in.
The text was updated successfully, but these errors were encountered: