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:
“Mothers risk alienating their mates if they expect them to hold or care for the baby exactly as they do. Fathers who are constantly criticized or corrected may lose interest in handling the baby, and this is a loss for everyone. The cycle is a dangerous one. Now the same mother feels bitter because she is no longer getting any help at home.”
—Cathy Rindner Tempelsman (20th century)
“When a poor disconsolated drooping creature is terrified from all enjoyment,prays without ceasing till his imagination is heated,fasts and mortifies and mopes, till his body is in as bad a plight as his mind; is it a wonder, that the mechanical disturbances ... of an empty belly, interpreted by an empty head, should be mistook for [the] workings [of God].”
—Laurence Sterne (17131768)
“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)