Re: Unchecked_Conversion and task pointer.



On Thu, 7 Jul 2005 16:31:51 -0500, Randy Brukardt wrote:

> "Dmitry A. Kazakov" <mailbox@xxxxxxxxxxxxxxxxx> wrote in message
> news:1xuh1gs97pwwg$.1v4w9ruw1n2x$.dlg@xxxxxxxxxxxxx
> ...
>> Task types are not tagged in Ada (alas).
>
> Task types that inherit from an interface are tagged in Ada 200Y.

Yes.

>> So if you are trying to have a
>> kind of task types hierarchy you should use mix-in.
>
> No, you should definitely use an interface.

It depends. Tasks are still non-tagged in the sense that you cannot have a
"task" interface. In an interface Who_Am_I can only be a *procedure*, which
could be then implemented by an entry. But it should an *entry* from the
beginning if the intent is to have a dispatching entry Who_Am_I called
using, say, timed entry call. In that case mix-in will be the only
workaround.

--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de
.