Closed manzt closed 6 months ago
Latest commit: f0aa55e14126698a8271d2094cc193d75c6c39d7
The changes in this PR will be included in the next version bump.
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
cc: @keller-mark @kylebarron
This means you could get pass down the signal
from Deck.gl tile fetcher to abort tile requests.
😍
I think it might be worth having both a timeout and a signal. Like set timeout to 10 seconds but stop sooner if the signal was aborted?
I think it might be worth having both a timeout and a signal. Like set timeout to 10 seconds but stop sooner if the signal was aborted?
I guess I'd defer this to the caller with AbortSignal.any
. What do you think?
let res = await invoke("_get_tile", tileId, {
signal: AbortSignal.any([deckSignal, AbortSignal.timeout(10_000)]),
});
I guess we could do this internally to have some final fallback.... but deciding on what the timeout should be generally is challenging.
I guess I'd defer this to the caller with
AbortSignal.any
. What do you think?
Oh that's cool! I didn't know that existed. That seems fine!
This allows more flexible control over aborting the invoke request, including delegating to third-party libraries that manage cancellation.