background preloader

Parallel .NET

Facebook Twitter

Generic Object Pool in .Net. Introduction Managing resources efficiently can be hard. Creating them or fetching them from their origin and load them into memory could take time, managing their state could be cumbersome, sometimes our resources are unmanaged resources so a memory leak is something we should also take into consideration when using them. A classic approach while using resources is to manage them in a pool of resources, usually named as object pool or resource pool. Objects pool is a "low tech" improvement to application performance, as it is "only" reuses resources, nothing fancy.

In this article I will cover some of the characteristics that we would expect to have in an Object Pool. Of course, the full source code of the Object Pool that will be described in this article is available for download. Background Object pools are everywhere. Surprisingly, I couldn’t find any object pool online that covers most of my requirements.

Object Pool Requirements · Support for more than one pool at the time 8: set 6: try. PPL Power Pack - Home. Go Parallel | Translating Multicore Power into Application Performance. .NET Parallel Programming Samples.