comp.lang.ada
 help / color / mirror / Atom feed
From: "Dan'l Miller" <optikos@verizon.net>
Subject: Re: Using the "Terminated" aspect for a task passed to a generic
Date: Mon, 23 Apr 2018 10:04:32 -0700 (PDT)
Date: 2018-04-23T10:04:32-07:00	[thread overview]
Message-ID: <d898e6b7-556a-417d-880a-97cb3213380d@googlegroups.com> (raw)
In-Reply-To: <d28c5bc2-6737-4a9a-8ab5-1e1a79866d8b@googlegroups.com>

On Monday, April 23, 2018 at 11:35:11 AM UTC-5, Dan'l Miller wrote:
> On Monday, April 23, 2018 at 9:20:33 AM UTC-5, NiGHTS wrote:
> > generic
> > 
> >         type Managed_Task_Type is limited private;
> 
> Wait.  Why can't we write:
> 
> generic
>   type Managed_Task_Type is limited task interface;
> package WD is
> ...
> 
> as per 12.5.5's AI95-00345 example in the _AARM:2012TC1_ page 527 (given there without the
> “limited”)?

Oh, as per _AARM:2012TC1_'s 3.9.4's Syntax paragraph 2/2, the syntax doesn't support the limited there because of the subsequent 5/2's “… all task and protected interfaces are synchronized interfaces, and all
synchronized interfaces are limited interfaces”.  So amended, it would revert to aforementioned example:

Wait.  Why can't OP modify the design to write:

generic
  type Managed_Task_Type is task interface;
package WD is
... // then the OP's design adjusted to pass in the task-interfaced type instead of having the package
    // contain a freshly-declared task.

as per 12.5.5's AI95-00345 example in the _AARM:2012TC1_ page 527?

  parent reply	other threads:[~2018-04-23 17:04 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-23 14:20 Using the "Terminated" aspect for a task passed to a generic NiGHTS
2018-04-23 15:40 ` AdaMagica
2018-04-23 16:23 ` Jeffrey R. Carter
2018-04-23 16:29 ` Dmitry A. Kazakov
2018-04-23 16:35 ` Dan'l Miller
2018-04-23 16:41   ` Dmitry A. Kazakov
2018-04-23 17:04   ` Dan'l Miller [this message]
2018-04-23 17:18 ` NiGHTS
replies disabled

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