comp.lang.ada
 help / color / mirror / Atom feed
From: "Jean-Pierre Rosen" <rosen@adalog.fr>
Subject: Re: Multiple entry tasks
Date: Fri, 20 Apr 2001 16:17:31 +0200
Date: 2001-04-20T16:17:31+02:00	[thread overview]
Message-ID: <9bpgnu$blc$1@s1.read.news.oleane.net> (raw)
In-Reply-To: sMGD6.3326$D4.330928@www.newsranger.com

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


"Ted Dennison" <dennison@telepath.com> a �crit dans le message news:
sMGD6.3326$D4.330928@www.newsranger.com...
> Ahhh. I didn't think about timed entry calls. Hmmm. So you are saying that
the
> runtime can change the state of the entry queues between the start of a
select
> statement and its decision to block or immediately accept an entry? In
that
> case, an "abort"ed task would hose him as well, right?
The point in general is that the 'Count attribute returns the length of the
queue at the time it is called, but that it can increase or decrease (due to
timed entry calls or -you're right- abort) at any time. You can use it for
optimization purpose; for example, you might want to serve the longest queue
first. If there is a race condition, you may very rarely choose a queue that
is suboptimal by 1 - that's acceptable. But 'Count should not be used in an
all-or-nothing context.

> Generally I find that one has to be very carful about using timed or
tenative
> entry calls. As a general rule, you have to be damn sure that the server
will at
> some point sit and wait for your entry. If there's an "else" or "delay"
clause
> on the server's selective wait, you can get into a nasty case of livelock.
Since
> I generally need to use one of those clauses, I don't use timed or
tenative
> rendezvous very much.
Timed entry calls are very useful: a client may well want to do something
else if the server does not accept a request within a given time frame. You
might well argue that in some contexts, all calls must be timed (i.e. ensure
not infinite blocking).

--
---------------------------------------------------------
           J-P. Rosen (rosen@adalog.fr)
Visit Adalog's web site at http://www.adalog.fr





  reply	other threads:[~2001-04-20 14:17 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-04-18 14:57 Multiple entry tasks Lutz Donnerhacke
2001-04-18 16:22 ` Marin David Condic
2001-04-18 18:12   ` Ted Dennison
2001-04-18 18:57     ` Ted Dennison
2001-04-18 20:16       ` Marin David Condic
2001-04-19 14:02         ` Ted Dennison
2001-04-19 14:28           ` Marin David Condic
2001-04-18 19:46     ` Marin David Condic
2001-04-19 21:52       ` Robert A Duff
2001-04-24  9:19         ` Lutz Donnerhacke
2001-04-19  8:17   ` Jean-Pierre Rosen
2001-04-19 14:42     ` Ted Dennison
2001-04-19 15:01       ` Marin David Condic
2001-04-19 15:02       ` Jean-Pierre Rosen
2001-04-19 19:12         ` Ted Dennison
2001-04-20 14:17           ` Jean-Pierre Rosen [this message]
2001-04-20 19:04             ` Ted Dennison
2001-04-23  6:55               ` Jean-Pierre Rosen
2001-04-23 13:50                 ` Ted Dennison
replies disabled

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