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

Support growing numPriorities in BlockingFetchQueues #18

Open
tpietzsch opened this issue Dec 5, 2022 · 0 comments
Open

Support growing numPriorities in BlockingFetchQueues #18

tpietzsch opened this issue Dec 5, 2022 · 0 comments
Assignees

Comments

@tpietzsch
Copy link
Member

BlockingFetchQueues is used to prioritize cell loading requests.
For multi-resolution images in BigDataViewer, cell requests are usually enqueued with a discrete priority level derived from the resolution level, such that low-resolution data is loaded before high-resolution data. Every resolution level corresponds to a priority level.

Currently, the number of priority levels is defined in the constructor and remains fixed.
Instead, BlockingFetchQueues should support to grow the number of priority levels after construction. This would be helpful, for example for SharedQueue, where many multi-res images may be using the same queue, and the maximum number of resolution levels cannot be pre-determined when the queue is created.

Concretely:
Add a new method void ensureNumPriorities(int numPriorities) which makes sure that (at least) numPriorities priority levels are available Reallocate queues[] if it needs to grow. The method should be protected by the same lock as take() and put().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant