comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Unchecked_Conversion and task pointer.
Date: Mon, 11 Jul 2005 13:28:42 -0500
Date: 2005-07-11T13:28:42-05:00	[thread overview]
Message-ID: <gbCdnXzt_aECJE_fRVn-ug@megapath.net> (raw)
In-Reply-To: tb8600lfqd2z.1l9etgzsgcls2.dlg@40tude.net

"Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> wrote in message
news:tb8600lfqd2z.1l9etgzsgcls2.dlg@40tude.net...
...
> > You can declare a task interface in Ada 200Y:
> >
> >     type T_Int is task interface;
> >
> > I probably should have done that in my example.
>
> Can a task interface have entries?

No, there are no stand-alone entries. But a procedure can match an entry and
be called as an entry.

> > You are allowed to use the primitive procedures of an interface in a
timed
> > entry call, and they will work as an entry in that case.
>
> Does it mean that in Ada 200Y any procedure of an interface can be used as
> if it were an entry?

Any primitive procedure of an interface, yes. If it is not an entry, it is
treated as if it is immediately open.

...
> > I wasn't (and am still not) convinced that this is the right design, but
it
> > certainly works and has the needed effects. I think there will be some
> > confusion from a readability standpoint, but otherwise you can do
everything
> > with such a procedure that you can do with an entry (other than requeue
it;
> > no one can figure out how a dispatching requeue could work - it couldn't
> > have been allowed if dispatching entries existed, either).
>
> Why? Ignoring misleading prefix notation can be ignored, to have a
> dispatching requeue, the target task or protected object of the entry must
> be class-wide:

Well, you can't ignore the prefix (it determines whether it is an internal
or external requeue). And I believe that there was another problem as well.
(I don't remember what it was, sorry.) It certainly doesn't work with the
"use a procedure like an entry" model, because it would make no sense to
requeue on a procedure.

                      Randy.






  reply	other threads:[~2005-07-11 18:28 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-07 15:50 Unchecked_Conversion and task pointer e.coli
2005-07-07 18:56 ` Randy Brukardt
2005-07-07 21:39   ` e.coli
2005-07-09  6:23     ` Simon Wright
2005-07-07 20:18 ` Dmitry A. Kazakov
2005-07-07 21:31   ` Randy Brukardt
2005-07-08  7:48     ` Dmitry A. Kazakov
2005-07-10  1:42       ` Randy Brukardt
2005-07-10  8:26         ` Dmitry A. Kazakov
2005-07-11 18:28           ` Randy Brukardt [this message]
2005-07-12  8:13             ` Dmitry A. Kazakov
2005-07-12 20:30               ` Randy Brukardt
2005-07-13  8:11                 ` 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