Handling of Empty Pools
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 multithreaded environment, a pool may block the client until another thread returns an object to the pool.
Read more about this topic: Object Pool Pattern
Famous quotes containing the words handling, empty and/or pools:
“Madam, a circulating library in a town is as an evergreen tree of diabolical knowledge; it blossoms through the year. And depend on it ... that they who are so fond of handling the leaves, will long for the fruit at last.”
—Richard Brinsley Sheridan (17511816)
“When you are praying, do not heap up empty phrases as the Gentiles do; for they think that they will be heard because of their many words.”
—Bible: New Testament, Matthew 6:7.
Jesus.
“The eastern light our spires touch at morning,
The light that slants upon our western doors at evening,
The twilight over stagnant pools at batflight,
Moon light and star light, owl and moth light,
Glow-worm glowlight on a grassblade.
O Light Invisible, we worship Thee!”
—T.S. (Thomas Stearns)