comp.lang.ada
 help / color / mirror / Atom feed
From: john.mccabe@emrad.com.nospam (John McCabe)
Subject: Re: Multiple task bodies for one task type?
Date: Mon, 17 Sep 2001 09:37:51 GMT
Date: 2001-09-17T09:37:51+00:00	[thread overview]
Message-ID: <3ba5c37f.6210990@news.demon.co.uk> (raw)
In-Reply-To: 3BA2A012.1C2A2903@san.rr.com

On Sat, 15 Sep 2001 00:26:01 GMT, Darren New <dnew@san.rr.com> wrote:

If I understand yuo correctly, what you want is a heterogeneous array
of tasks. If that is the case, I don't believe it is supported by Ada
as the task type is not extendable.

>But it looks like each task type gets exactly one task body.

That is correct.

>Of course, the primary problem is that things like "accept" and "abort"
>and such have to actually be in the task body itself, not in subprograms
>called from the task body, or I'd just make (say) a generic with a
>procedure for each entry, or something.

>Any hints how one would go about this? Thanks in advance!

You may be able to implement someting like this using a discriminant
on the task type. You would have to include all possible variations on
the code within a case statement in the task. There may be other ways
of course!

Hope this helps.



  reply	other threads:[~2001-09-17  9:37 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-09-15  0:26 Multiple task bodies for one task type? Darren New
2001-09-17  9:37 ` John McCabe [this message]
2001-09-17 14:01   ` Tucker Taft
2001-09-18 19:01   ` Richard Riehle
2001-09-18 21:03     ` Darren New
2001-09-18 21:26     ` tmoran
2001-09-17 14:15 ` Stephen Leake
replies disabled

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