comp.lang.ada
 help / color / mirror / Atom feed
* Taking 'Access of single task/protected object
@ 2016-01-07 16:18 G.B.
  2016-01-07 17:30 ` Dmitry A. Kazakov
  2016-01-07 18:16 ` Jeffrey R. Carter
  0 siblings, 2 replies; 6+ messages in thread
From: G.B. @ 2016-01-07 16:18 UTC (permalink / raw)


It seems impossible to take the 'Access (or 'Unchecked_Access)
of a single task object, since it cannot be made aliased.
And, I guess, as it is not of a named type, so that there
is no way to express even an anonymous access type.

This is, I think, the crucial bit of a question (34540199)
asked at stackoverflow. (The example uses some listener pattern
which looks like Java written in Ada, but that's not why I'm
asking.)


   task Single is
      entry Something;
   end Single;

   ...some_context (access_discriminant => Single'Access)...

somefile:  prefix of "Access" attribute must be aliased

So, suppose some_context requires indirect access to a single
task object, i.e., to one of an anonymous task type.
Is there a preferred solution to single-task vs. multiple
references?


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-01-08  8:52 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-07 16:18 Taking 'Access of single task/protected object G.B.
2016-01-07 17:30 ` Dmitry A. Kazakov
2016-01-07 18:16 ` Jeffrey R. Carter
2016-01-07 19:38   ` J-P. Rosen
2016-01-07 23:52   ` Randy Brukardt
2016-01-08  8:52     ` J-P. Rosen

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