On 21/10/2025 08:40, Filip Egeric wrote:
Hello,I would like to follow up on this one, because I also found myself creating a wrapper similar to this one, but for a different reason. Specifically, when I want to limit concurrency in order to not exceed a rate limit somewhere.
Have you tried using a ThreadFactory factory instead? A custom ThreadFactory can be used to wrap all tasks so you get the acquire/release to limit concurrency.
-Alan
