Java Concurrent Object Pool?
问题 I tried to integrate an external non-thread-safe library to my web project; I found out that it's too expensive to create an instance of this object for each client thread. As a result, I would like to create an object pool which has the following property. Dynamic object creation, the objects in the pool are dynamically created instead of creating them in the constructor. The pool is initially empty, and when a client thread acquires a resource object, the pool can create a new resource on