Does Java have an indexable multi-queue thread pool?
Is there a Java class such that: Executable tasks can be added via an id, where all tasks with the same id are guaranteed to never run concurrently The number of threads can be limited to a fixed amount A naive solution of a Map would easily solve (1), but it would be difficult to manage (2). Similarly, all thread pooling classes that I know of will pull from a single queue, meaning (1) is not guaranteed. Solutions involving external libraries are welcome. If you don't find something that does this out of the box, it shouldn't be hard to roll your own. One thing you could do is to wrap each