Closed tuner closed 10 months ago
i think you might be right here. i've found it really hard to test abort signal code so it sometimes has bugs...thanks for catching. PR to add this here https://github.com/GMOD/tabix-js/pull/144
note that this signal, once pr is merged, will then go through abortable-promise-cache which we've done our best to make sure works, but has some somewhat complex behavior of it's own (e.g. if multiple requests are made for the same resource, it only aborts if all of them abort).
I will release a patch version of tabix and then you can try it out though!
published as 1.5.12!
Hi Colin. Thanks for the prompt reply!
There's another issue that I didn't catch. signal
is declared but never assigned! After fixing that in my node_modules
folder (I was lazy), it started to behave as expected:
I throttled the network in Devtools so that it's easier to abort the web requests 😃
note that this signal, once pr is merged, will then go through abortable-promise-cache which we've done our best to make sure works, but has some somewhat complex behavior of it's own (e.g. if multiple requests are made for the same resource, it only aborts if all of them abort).
That behavior sounds reasonable. If someone needs the resource, then it has to be fetched. There's no overhead.
nice catch, added another point release with that fix (v1.5.13)
Thanks! It works now.
I'll try to make a PR next time!
Hi,
Although
tbiIndexed.getLines
accepts anAbortSignal
, it's not propagated tochunkCache
and thus, the fetch request are not aborted.https://github.com/GMOD/tabix-js/blob/a7004eb4b356aa6151fc3602bb73c47d92be8834/src/tabixIndexedFile.ts#L189
It seems that the third parameter, the
signal
is missing (?)