嵌入式系统与单片机|技术阅读
登录|注册

您现在的位置是:嵌入式系统与单片机 > 资源下载 > 数据结构 > Many applications use connection/object pool. A program may require a IMAP connection pool and LDAP

Many applications use connection/object pool. A program may require a IMAP connection pool and LDAP

  • 资源大小:171 K
  • 上传时间: 2024-05-20
  • 上传用户:du1531782633
  • 资源积分:2 下载积分
  • 标      签: connection pool applications program

资 源 简 介

Many applications use connection/object pool. A program may require a IMAP connection pool and LDAP connection pool. One could easily implement a IMAP connection pool, then take the existing code and implement a LDAP connection pool. The program grows, and now there is a need for a pool of threads. So just take the IMAP connection pool and convert that to a pool of threads (Copy, paste, find, replace????). Need to make some changes to the pool implementation? Not a very easy task, since the code has been duplicated in many places. Re-inventing source code is not an intelligent approach in an object oriented environment which encourages re-usability. It seems to make more sense to implement a pool that can contain any arbitrary type rather than duplicating code. How does one do that? The answer is to use type parameterization, more commonly referred to as templates.

相 关 资 源