comp.lang.ada
 help / color / mirror / Atom feed
From: "Jean-Pierre Rosen" <rosen.adalog@wanadoo.fr>
Subject: Re: Blocking protected ops (was: Tasks and C/C++ code)
Date: 1998/11/25
Date: 1998-11-25T00:00:00+00:00	[thread overview]
Message-ID: <73gtdh$g7i$1@platane.wanadoo.fr> (raw)
In-Reply-To: 365BE117.59209A5@elca-matrix.ch


Mats Weber a �crit dans le message
<365BE117.59209A5@elca-matrix.ch>...
>I still don't see why an accept statement is allowed to contain a
>potentially blocking call, but a protected procedure is not.
>
Because a protected type is much lower level than tasks.
On a multi-processor, the protection can be implemented
by busy-waiting on a global lock; you don't want to allow
a task to be stuck in the protected object for a long time.
There is no such issue for tasks (which is BTW why
tasks and rendezvous are still useful).

My own rule of thumb:
if it's simple, low-level and quick, use a protected type.
Otherwise, and especially if it's a high level operation,
or if you need to do more that checking a boolean or
bumping a counter, use tasks.

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






  reply	other threads:[~1998-11-25  0:00 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-11-09  0:00 Tasks and C/C++ code Barry L. Dorough
1998-11-09  0:00 ` Mats Weber
1998-11-10  0:00 ` dennison
1998-11-11  0:00   ` dbotton
1998-11-11  0:00     ` dennison
1998-11-11  0:00     ` Barry L. Dorough
1998-11-11  0:00       ` dennison
1998-11-12  0:00       ` Jerry van Dijk
1998-11-13  0:00       ` Mats Weber
1998-11-18  0:00     ` Samuel Tardieu
1998-11-19  0:00       ` Mats Weber
1998-11-20  0:00         ` Samuel Tardieu
1998-11-23  0:00           ` Mats Weber
1998-11-23  0:00             ` Tom Moran
1998-11-24  0:00               ` Blocking protected ops (was: Tasks and C/C++ code) Mats Weber
1998-11-24  0:00                 ` Robert I. Eachus
1998-11-25  0:00                   ` Mats Weber
1998-11-25  0:00                     ` Jean-Pierre Rosen [this message]
1998-11-27  0:00                       ` Mats Weber
1998-11-25  0:00                     ` Robert I. Eachus
1998-11-26  0:00                       ` Simon Wright
1998-11-27  0:00                         ` David Botton
1998-11-27  0:00                           ` Tom Moran
1998-11-27  0:00                             ` Jerry van Dijk
1998-11-28  0:00                               ` Tom Moran
1998-11-27  0:00                           ` Mats Weber
1998-11-29  0:00                         ` Tucker Taft
1998-11-30  0:00                           ` Simon Wright
replies disabled

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