comp.lang.ada
 help / color / mirror / Atom feed
From: Richard Riehle <richard@adaworks.com>
Subject: Re: ADA Tasks
Date: Sun, 01 Dec 2002 22:56:09 -0800
Date: 2002-12-02T06:48:28+00:00	[thread overview]
Message-ID: <3DEB0409.E259CD24@adaworks.com> (raw)
In-Reply-To: a5a588a6.0212011837.5e378fd6@posting.google.com

Khuram Imtiaz wrote:

> Is it possible to have tasks which contain both (entries/accepts and
> calls).Could this be a bad idea? If so, why? can someone explain it
> with a pseudo code. I would appreciate your help in this regard.

An important point to remember about an entry is that it has a queue.
A subprogram does not have a queue.   In concurrency this is important
because an entry call is not a call for immediate action.   Rather, an
entry call simply places an entry ( a request for action) in the queue.

Almost every other mechanism in tasking relies on this simple idea.
For example, timed entry calls, conditional entry calls, asynchronous
transfer of control, etc. all depend on the notion of an entry queue.

If a task had a subprogram, we would expect an immediate response
upon calling it.   At the very least, we would expect the call to
be re-entrant.  That would have some strange implications for any
active object (task).

On the other hand, a passive object (protected object) can accomodate
the mixture of entries and subprograms quite easily.

Hope this is helpful.

Richard Riehle






  parent reply	other threads:[~2002-12-02  6:56 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-12-02  2:37 ADA Tasks Khuram Imtiaz
2002-12-02  4:56 ` James S. Rogers
2002-12-02  6:56 ` Richard Riehle [this message]
2002-12-02 15:15 ` Robert A Duff
2002-12-02 15:46   ` Jean-Pierre Rosen
2002-12-03 14:37     ` Dmitry A. Kazakov
2002-12-03 22:06       ` Simon Wright
2002-12-04 13:52         ` 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