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:
“That a good fit between parental handling and child temperament is vital to help children adapt to the imperatives of their society is a crucial concept that can be applied to other cultures.”
—Stella Chess (20th century)
“To people off alone, as we were, there is something stirring about finding evidences of human labour and care in the soil of an empty country. It comes to you as a sort of message, makes you feel differently about the ground you walk over every day.”
—Willa Cather (18731947)
“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)