With RequestQueue added to the zarr load path, if OMEZarrLoader.loadVolumeData is called and then called again before chunk requests generated by the first call can complete, we should be able to cancel the requests made by the previous call. However, it is possible that the new loads want the same chunks! We should be able to transfer ownership of in-progress requests to the new load, rather than send lots of different requests for the same data.
Solution
Enable either RequestQueue or a new wrapper class to pick cancelled requests back up if they were already in progress. Make promises returned by this queue unique to a single request and a single subscriber, and reject only the promise associated with a single subscriber without trying to halt a request in progress. Use this new behavior to implement the behavior described above.
Use Case
With
RequestQueue
added to the zarr load path, ifOMEZarrLoader.loadVolumeData
is called and then called again before chunk requests generated by the first call can complete, we should be able to cancel the requests made by the previous call. However, it is possible that the new loads want the same chunks! We should be able to transfer ownership of in-progress requests to the new load, rather than send lots of different requests for the same data.Solution
Enable either
RequestQueue
or a new wrapper class to pick cancelled requests back up if they were already in progress. Make promises returned by this queue unique to a single request and a single subscriber, and reject only the promise associated with a single subscriber without trying to halt a request in progress. Use this new behavior to implement the behavior described above.