comp.lang.ada
 help / color / mirror / Atom feed
From: "Jean-Pierre Rosen" <rosen.adalog@wanadoo.fr>
Subject: Re: Ada Protected Object Tutorial #1
Date: 1999/12/27
Date: 1999-12-27T09:45:36+00:00	[thread overview]
Message-ID: <847cg0$pmc$1@wanadoo.fr> (raw)
In-Reply-To: 846rk7$gba$1@nnrp1.deja.com

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1431 bytes --]


Robert Dewar <robert_dewar@my-deja.com> a �crit dans le message :
846rk7$gba$1@nnrp1.deja.com...
> In article <slrn86d0ao.fbn.kaz@ashi.FootPrints.net>,
>   kaz@ashi.footprints.net wrote:
> > That's the sense that I get. For example, earlier in the
> debate I was told that
> > when the requirements change in certain ways, you have to
> abandon protected
> > objects. E.g. if you need an object's operation to call into
> another subsystem
> > which may call back.
>
> Really the point is that protected objects are best thought of
> as a framework for constructing very simple synchronization
> primitives with a minimum of active code. As soon as a protected
> object acquires complex internal logic, it is better represented
> by a separate Ada task.
>
I fully agree here, but there is another issue that is worth mentionning:
If you use protected objects, all tasks are in the position of a *client*,
which makes termination much more tricky.
You must deal with termination by having explicit "termination" messages
between tasks, and you must make sure that these messages are sent in all
cases, including tasks terminating because of abort or unhandled exceptions.
This can be made often automatic if you use rendezvous and an a terminate
alternative.
--
---------------------------------------------------------
           J-P. Rosen (Rosen.Adalog@wanadoo.fr)
Visit Adalog's web site at http://pro.wanadoo.fr/adalog






  reply	other threads:[~1999-12-27  0:00 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-12-15  0:00 Ada Protected Object Tutorial #1 James S. Rogers
1999-12-16  0:00 ` Kaz Kylheku
1999-12-16  0:00   ` James S. Rogers
1999-12-17  0:00     ` Laurent Guerby
1999-12-16  0:00   ` John English
1999-12-16  0:00     ` Ed Falis
1999-12-16  0:00       ` Usenet Poster Boy
1999-12-17  0:00     ` Karel Th�nissen
1999-12-17  0:00       ` Laurent Guerby
1999-12-18  0:00         ` Kaz Kylheku
1999-12-18  0:00           ` Laurent Guerby
1999-12-18  0:00             ` Kaz Kylheku
1999-12-19  0:00               ` Laurent Guerby
1999-12-20  0:00                 ` Stanley R. Allen
1999-12-21  0:00               ` Robert I. Eachus
     [not found]             ` <33qr5scnbs04v391ev4541p5bv48hklg3q@4ax.com>
1999-12-20  0:00               ` Robert A Duff
1999-12-18  0:00           ` Robert A Duff
1999-12-18  0:00             ` Kaz Kylheku
1999-12-18  0:00         ` Karel Th�nissen
1999-12-18  0:00           ` Laurent Guerby
1999-12-17  0:00       ` Mike Silva
1999-12-24  0:00       ` Kenneth Almquist
1999-12-17  0:00   ` Robert A Duff
1999-12-17  0:00     ` Vladimir Olensky
1999-12-17  0:00   ` Tucker Taft
1999-12-18  0:00     ` Kaz Kylheku
1999-12-18  0:00       ` Robert A Duff
1999-12-18  0:00         ` Kaz Kylheku
1999-12-19  0:00           ` swhalen
1999-12-19  0:00             ` Kaz Kylheku
1999-12-19  0:00               ` Laurent Guerby
1999-12-19  0:00               ` Robert Dewar
1999-12-20  0:00       ` Vladimir Olensky
1999-12-26  0:00         ` Ehud Lamm
1999-12-26  0:00           ` Robert Dewar
1999-12-26  0:00             ` Kaz Kylheku
1999-12-27  0:00               ` Robert Dewar
1999-12-27  0:00                 ` Jean-Pierre Rosen [this message]
1999-12-27  0:00                 ` Richard D Riehle
1999-12-27  0:00                   ` Robert Dewar
1999-12-31  0:00                     ` Richard D Riehle
1999-12-27  0:00               ` Robert Dewar
2000-01-02  0:00             ` Tucker Taft
1999-12-17  0:00 ` Robert A Duff
1999-12-18  0:00   ` Kaz Kylheku
replies disabled

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