comp.lang.ada
 help / color / mirror / Atom feed
From: Georg Bauhaus <rm.dash-bauhaus@futureapps.de>
Subject: Re: High-Integrity OO and controlled types
Date: Wed, 04 May 2011 17:25:43 +0200
Date: 2011-05-04T17:25:43+02:00	[thread overview]
Message-ID: <4dc16ff7$0$6985$9b4e6d93@newsspool4.arcor-online.net> (raw)
In-Reply-To: <1ligthpgu6ogv$.dquevy2bn4tw$.dlg@40tude.net>

On 04.05.11 17:01, Dmitry A. Kazakov wrote:

> This looks like the "checkpoint synchronization problem".

That's part of it.

>    http://rosettacode.org/wiki/Checkpoint_synchronization

Try adding pragma Profile (Ravenscar) there ;.)

> I would use a protected object to implement an array of events and
> distributing jobs among the worker tasks when they join or leave. I would
> likely place the array there. I would avoid polling.

The idea is to have two very busy tasks share an array
as efficiently as possible.

I'm trying to weigh all effects of rewriting the following
nest using the type-ized formalism that you have mentioned.

 procedure A is
   X : T;

   procedure B_Opt is
     type T1 is ...;
     Y : T1;
   begin
     Op(X, V);
     Op(Y, V);
   exception
     when ... =>
       Restore(X);  --?
       --  Y cleans up after itself
   end B_Opt;

 begin
   B_Opt;
   Op(X);
 end A;

Is there really little overhead when Restore is replaced
with some objects?



  reply	other threads:[~2011-05-04 15:25 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-01 20:38 High-Integrity OO and controlled types Maciej Sobczak
2011-05-01 21:29 ` Robert A Duff
2011-05-01 22:44   ` Simon Wright
2011-05-02  7:59   ` Dmitry A. Kazakov
2011-05-02 16:32     ` Robert A Duff
2011-05-02 19:39       ` Dmitry A. Kazakov
2011-05-03  0:08         ` Robert A Duff
2011-05-03  7:30           ` Dmitry A. Kazakov
2011-05-03 16:51             ` Robert A Duff
2011-05-02  9:50 ` Cyrille
2011-05-02 10:01   ` Cyrille
2011-05-02 19:25     ` Maciej Sobczak
2011-05-03  9:32       ` Cyrille
2011-05-03  9:59         ` Maciej Sobczak
2011-05-03 10:24           ` Dmitry A. Kazakov
2011-05-03 16:53             ` Robert A Duff
2011-05-03 17:37               ` Dmitry A. Kazakov
2011-05-03 11:28           ` Georg Bauhaus
2011-05-03 12:27             ` Dmitry A. Kazakov
2011-05-03 15:22               ` Georg Bauhaus
2011-05-03 16:28                 ` Dmitry A. Kazakov
2011-05-04  8:48                   ` Georg Bauhaus
2011-05-04  9:28                     ` Dmitry A. Kazakov
2011-05-04 14:46                       ` Georg Bauhaus
2011-05-04 15:01                         ` Dmitry A. Kazakov
2011-05-04 15:25                           ` Georg Bauhaus [this message]
2011-05-04 16:23                             ` Dmitry A. Kazakov
2011-05-04 17:06                               ` Georg Bauhaus
2011-05-04 20:16                                 ` Dmitry A. Kazakov
2011-05-05  7:13                                   ` Maciej Sobczak
2011-05-05 10:58                                     ` Cyrille
2011-05-05 12:35                                       ` Dmitry A. Kazakov
replies disabled

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