Speaking to @zzorba we have decided that requesting cancellation from JS should be done by adding requestCancellation or cancel to each promise returned.
a) an Rust call to the cancellation request method is called.
b) if Rust respects that request, the promise is rejected with a cancellation error.
c) If Rust does not respect the request, and continues until completion, then the promise is resolved as usual.
Speaking to @zzorba we have decided that requesting cancellation from JS should be done by adding
requestCancellation
orcancel
to each promise returned.becomes:
where
CancelablePromise
is:In the event of a
cancel
method being called:a) an Rust call to the cancellation request method is called. b) if Rust respects that request, the promise is rejected with a cancellation error. c) If Rust does not respect the request, and continues until completion, then the promise is resolved as usual.