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:
“For a novel addressed by a man to men and women of full age; which attempts to deal unaffectedly with the fret and fever, derision and disaster, that may press in the wake of the strongest passion known to humanity; to tell, without a mincing of words, of a deadly war waged between flesh and spirit; and to point the tragedy of unfulfilled aims, I am not aware that there is anything in the handling to which exception can be taken.”
—Thomas Hardy (18401928)
“Beware the politically obsessed. They are often bright and interesting, but they have something missing in their natures; there is a hole, an empty place, and they use politics to fill it up. It leaves them somehow misshapen.”
—Peggy Noonan (b. 1950)
“One merit in Carlyle, let the subject be what it may, is the freedom of prospect he allows, the entire absence of cant and dogma. He removes many cartloads of rubbish, and leaves open a broad highway. His writings are all unfenced on the side of the future and the possible. Though he does but inadvertently direct our eyes to the open heavens, nevertheless he lets us wander broadly underneath, and shows them to us reflected in innumerable pools and lakes.”
—Henry David Thoreau (18171862)