From: "Alex R. Mosteo" <devnull@mailinator.com>
Subject: Task entries and access to subprograms.
Date: Wed, 06 Apr 2005 12:25:27 +0200
Date: 2005-04-06T12:25:27+02:00 [thread overview]
Message-ID: <4253B917.5070800@mailinator.com> (raw)
Hi,
this is a question about the validity of some approach I'm trying. I
know that task entries can't have access parameters. My gnat gap 1.1.0
linux behaves like that:
type AInt is access all Integer;
type Code is access procedure;
task type Blah is
entry One (I : access Integer); -- Illegal and detected.
entry Two (I : AInt); -- No complaint. Legal?
entry Three (C : not null access procedure); -- Illegal and detected.
-- I have the Ada0Y features enabled.
entry Four (C : Code); -- No complaint.
end Blah;
I want to execute some arbitrary code inside a task. This is because
GtkAda in win32 requires all Gtk calls to be made from the same thread,
and I want to have code outside of that thread able to make Gtk calls
(for abstraction and future extension purposes I don't want to hardcode
all my Gtk calls in that task).
Apparently the fourth approach works under linux, but I'm worried it may
be a bad trick. If this isn't legal I could use a tagged type with a
defined Execute method, so I'd pass instances of derived types of this
base class to the task, and execute the dispatching call.
I'm interested in your oppinion about the second and fourth entries
above, and in other alternatives to the tagged type workaround.
Thanks!
next reply other threads:[~2005-04-06 10:25 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-06 10:25 Alex R. Mosteo [this message]
2005-04-06 10:54 ` Task entries and access to subprograms Adrien Plisson
2005-04-06 12:06 ` Dmitry A. Kazakov
2005-04-06 12:22 ` Alex R. Mosteo
2005-04-07 2:05 ` Jeffrey Carter
2005-04-07 7:23 ` Alex R. Mosteo
2005-04-07 14:01 ` Robert A Duff
2005-04-07 23:23 ` Randy Brukardt
2005-04-08 6:49 ` Alex R. Mosteo
2005-04-08 14:49 ` Robert A Duff
2005-04-08 15:23 ` 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