Content deleted Content added
→Pitfalls: minor rephrasing |
|||
Line 7:
Object pools employ one of three strategies to handle a request when there are no spare objects in the pool.
# Fail to provide an object (and return an error to the client).
# Allocate a new object, thus increasing the size of the pool. Pools that do this usually allow you to set the [[high water mark]] (the maximum number of objects ever used).
# In a [[Thread (computer science)|multithreaded]] environment, a pool may block the client until another thread returns an object to the pool.
|