comp.lang.ada
 help / color / mirror / Atom feed
From: Jeffrey Carter <jrcarter@acm.org>
Subject: Re: new_line in a put_line
Date: Thu, 05 Dec 2002 01:31:14 GMT
Date: 2002-12-05T01:31:14+00:00	[thread overview]
Message-ID: <3DEEAC52.5000906@acm.org> (raw)
In-Reply-To: 3DEE3ED2.7070009@cogeco.ca

Warren W. Gay VE3WWG wrote:
> 
> The Rendezvous has the benefit that the request to perform output
> is queued. This results in greater efficiency on most platforms
> because it avoids having threads wake up and test to see if they
> won out on the condition variable set (protected object).

I think you're mistaken. After performing a protected procedure or 
entry, it's perfectly legal for the same task to check the barriers of 
the object. I don't know about implementations, but this is certainly 
intended behavior for protected objects. Thus, tasks don't have to "wake 
up" until they are ready to run.

> 
> It also guarantees "order". With the protected object approach a
> "Johnnie come lately" task could gain access while already blocked
> tasks are waiting to gain access -- destroying the waiting line
> sequence. This may create some confusing to read "output".

If you need to guarantee order for a protected operation it should be an 
entry. This guarantees the same order as for a task entry.

-- 
Jeff Carter
"You've got the brain of a four-year-old boy,
and I bet he was glad to get rid of it."
Horse Feathers




  reply	other threads:[~2002-12-05  1:31 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-12-02  5:36 new_line in a put_line Vlad
2002-12-02  9:47 ` Preben Randhol
2002-12-02 17:04   ` Frank J. Lhota
2002-12-05 11:10     ` Preben Randhol
2002-12-02 10:14 ` Dmitry A. Kazakov
2002-12-02 14:57 ` Matthew Heaney
2002-12-03 11:33   ` Fraser Wilson
2002-12-03 15:01     ` Dmitry A. Kazakov
2002-12-04  9:31       ` Fraser Wilson
2002-12-04 14:10         ` Dmitry A. Kazakov
2002-12-04 15:23           ` Robert A Duff
2002-12-04 16:15             ` Dmitry A. Kazakov
2002-12-04 18:11               ` tmoran
2002-12-04 20:21                 ` Simon Wright
2002-12-05  9:36                 ` Dmitry A. Kazakov
2002-12-05 22:40                   ` tmoran
2002-12-04 15:25           ` Stephen Leake
2002-12-04 16:55             ` Jeffrey Carter
2002-12-04 17:24               ` Stephen Leake
2002-12-04 17:43               ` Warren W. Gay VE3WWG
2002-12-05  1:31                 ` Jeffrey Carter [this message]
2002-12-05 18:11                   ` Warren W. Gay VE3WWG
2002-12-02 15:49 ` Robert A Duff
  -- strict thread matches above, loose matches on Subject: below --
2002-12-03 11:52 Grein, Christoph
2002-12-04  9:39 ` Fraser Wilson
2002-12-04 10:03 Grein, Christoph
2002-12-05  6:16 Grein, Christoph
2002-12-05  9:44 ` Dmitry A. Kazakov
2002-12-05  6:28 Grein, Christoph
2002-12-05 14:19 ` Stephen Leake
replies disabled

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