Pool (computer science)

from Wikipedia, the free encyclopedia

In computer science, a pool is a set of pre-initialized resources that are ready for use at any time, instead of being allocated every time when necessary and then destroyed again. A client requests an object from the pool and performs operations on the returned object. When the client is done with the object, it returns it to the pool instead of destroying it.

Pooling can lead to a significant increase in performance in situations in which the initialization costs or times of instances of a resource are high, but their simultaneous number is low . The instance of a resource in the pool can be obtained in a predictable time, while the creation of new instances (especially over the network) can take different lengths of time. However, the advantages mostly apply to resources whose initialization time is long , such as database connections , sockets or thread and graphic objects such as fonts or bitmaps .

Examples

Design pattern

Design patterns are tried and tested approaches to solving common problems; pooling mechanisms are the basis of the following design patterns:

swell

  1. ^ Wenlong Dong: A Sample for WCF Client Proxy Pooling. In: Wenlong Dong's Blog, MSDN. Microsoft, November 14, 2007, accessed July 13, 2014 .