Skip to content
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

Merged
merged 2 commits into from
Dec 14, 2022

Commits on Dec 12, 2022

  1. chore: remove unused variables

    Remove some unused variables triggering "unused variable" warnings.
    
    Signed-off-by: Christian Stewart <christian@paral.in>
    paralin committed Dec 12, 2022
    Configuration menu
    Copy the full SHA
    78efa04 View commit details
    Browse the repository at this point in the history

Commits on Dec 14, 2022

  1. feat: RPC: add useAbortSignal option

    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>
    paralin committed Dec 14, 2022
    Configuration menu
    Copy the full SHA
    f51c0d9 View commit details
    Browse the repository at this point in the history