comp.lang.ada
 help / color / mirror / Atom feed
From: "Jeffrey R. Carter" <spam.jrcarter.not@spam.not.acm.org>
Subject: Re: Using the "Terminated" aspect for a task passed to a generic
Date: Mon, 23 Apr 2018 18:23:42 +0200
Date: 2018-04-23T18:23:42+02:00	[thread overview]
Message-ID: <pbl1ae$m6v$1@dont-email.me> (raw)
In-Reply-To: <f2cc5db4-1abf-4a4c-92ed-089e0e7d6d21@googlegroups.com>

On 04/23/2018 04:20 PM, NiGHTS wrote:
> 
> generic
> 
>          type Managed_Task_Type is limited private;
> 
> package WD is
> 
>          task WD_Thread;
> 
> end WD;

Ada doesn't have a generic formal task type. Within WD, the only operations you 
have on the type are 'Address, 'Size, "in", and "not in". (I thinks that's it. 
If I've forgotten some, they're similar in utility.) If you want to apply any 
other operation, you have to require it as a generic formal subprogram:

generic
    type Managed_Task is limited private;
    with function Terminated (T : Managed_Task) return Boolean;
package WD is ...

-- 
Jeff Carter
"When danger reared its ugly head, he bravely
turned his tail and fled."
Monty Python and the Holy Grail
60


  parent reply	other threads:[~2018-04-23 16:23 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 [this message]
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
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