comp.lang.ada
 help / color / mirror / Atom feed
From: reinert <reinkor@gmail.com>
Subject: Re: Task safe containers? Help needed.
Date: Mon, 9 Oct 2017 02:18:35 -0700 (PDT)
Date: 2017-10-09T02:18:35-07:00	[thread overview]
Message-ID: <e0537531-4eaf-428f-88ee-5b77475e2873@googlegroups.com> (raw)
In-Reply-To: <ordibc$7ku$1@gioia.aioe.org>

Thanks, will test out options...

reinert

On Sunday, October 8, 2017 at 6:05:04 PM UTC+2, Dmitry A. Kazakov wrote:
> On 2017-10-08 17:10, reinert wrote:
> 
> > About your first option: Putting the containers in a protected
> > object  makes the container functions "private" and not directly available
> > outside the protected object. Right?
> 
> Which is good, since they are unsafe.
> 
> > But your other options also somehow complicates :-)
> 
> Not at all.
> 
> > A compromise seems to be necessary :-)
> 
> There is no compromise, each method has its use.
> 
> > Maybe the first option anyway
> > facilitates cleanest code?
> 
> No. The cleanest code would be per delegation. Ada has none. Then there 
> are issues with interface functions while most relevant synchronization 
> mechanisms considered mutating. The Rosen's trick is used to work that 
> around. A problem for monitor (#2.b) is to have an unconstrained result, 
> since task entries cannot return such.
> 
> > There must be a reason for the invention of
> > protected types.
> 
> The reason was to add an OO view on synchronization as a complement to 
> the procedural view tasks offer.
> 
> The implementation provided by protected objects was chosen to be most 
> efficient, powerful, safe, verifiable and universal. Which comes with 
> certain limitations.
> 
> -- 
> Regards,
> Dmitry A. Kazakov
> http://www.dmitry-kazakov.de

  reply	other threads:[~2017-10-09  9:18 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-08  4:27 Task safe containers? Help needed reinert
2017-10-08  5:42 ` Niklas Holsti
2017-10-08  6:57 ` Dmitry A. Kazakov
2017-10-08 15:10   ` reinert
2017-10-08 16:05     ` Dmitry A. Kazakov
2017-10-09  9:18       ` reinert [this message]
2017-10-09 21:54   ` Randy Brukardt
2017-10-10  7:25     ` Dmitry A. Kazakov
2017-10-10 19:48       ` Randy Brukardt
replies disabled

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