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:
“It is curious how instinctively one protects the image of oneself from idolatry or any other handling that could make it ridiculous, or too unlike the original to be believed any longer.”
—Virginia Woolf (18821941)
“Come hither, all ye empty things,
Ye bubbles raisd by breath of Kings;
Who float upon the tide of state,
Come hither, and behold your fate.
Let pride be taught by this rebuke,
How very mean a things a Duke;
From all his ill-got honours flung,
Turnd to that dirt from whence he sprung.”
—Jonathan Swift (16671745)
“There will be better days when I am gone
And healing pools where I cannot be healed.
Fragrant stars will gleam forever and ever
Above the place where I lie desolate.”
—Arna Bontemps (19021973)