comp.lang.ada
 help / color / mirror / Atom feed
From: "Jeffrey R. Carter" <spam.jrcarter.not@spam.acm.org>
Subject: Re: Task vs Protected Type
Date: Fri, 30 May 2008 17:30:27 GMT
Date: 2008-05-30T17:30:27+00:00	[thread overview]
Message-ID: <TQW%j.132547$TT4.116757@attbi_s22> (raw)
In-Reply-To: <g1p214$296$1@registered.motzarella.org>

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



      parent reply	other threads:[~2008-05-30 17:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-30 14:12 Task vs Protected Type Sébastien
2008-05-30 14:33 ` Dmitry A. Kazakov
2008-05-30 16:09   ` Sébastien
2008-05-30 15:15 ` Jean-Pierre Rosen
2008-05-30 17:30 ` Jeffrey R. Carter [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox