From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,9b794838d82ee7c3 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!news4.google.com!news1.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!wns14feed!worldnet.att.net!attbi_s22.POSTED!53ab2750!not-for-mail From: "Jeffrey R. Carter" User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Task vs Protected Type References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Message-ID: NNTP-Posting-Host: 12.201.97.213 X-Complaints-To: abuse@mchsi.com X-Trace: attbi_s22 1212168627 12.201.97.213 (Fri, 30 May 2008 17:30:27 GMT) NNTP-Posting-Date: Fri, 30 May 2008 17:30:27 GMT Organization: AT&T ASP.att.net Date: Fri, 30 May 2008 17:30:27 GMT Xref: g2news1.google.com comp.lang.ada:486 Date: 2008-05-30T17:30:27+00:00 List-Id: S�bastien wrote: > > For example, you have a web application and want to develop an object > pool. You could use one of both example, since it's the same purpose > with some GetObject and ReleaseObject enties/procedure in a task or in a > protected. But which one is the better approach? For data protection, a protected object is usually better (a semaphore protects its state information). A custom protected object is usually better than a semaphore, too. When you must use a semaphore, a safe semaphore using controlled-type initialization and finalization is usually better than a simple semaphore. -- Jeff Carter "Ah, go away or I'll kill ya." Never Give a Sucker an Even Break 100