This is a DPool open source repository.
DPool (Definable Pool) is a simple thread pool tool based on concurrent-ruby and it support custom thread count limit for each request when you set limit for total thread count. There is a default scheduling algorithm to implement how to use these thread, also, you can rewrite the scheduling logic.
You can find example in test folder.