comp.lang.ada
 help / color / mirror / Atom feed
From: stt@houdini.camb.inmet.com (Tucker Taft)
Subject: Re: Streams and Concurrency
Date: 1998/12/30
Date: 1998-12-30T00:00:00+00:00	[thread overview]
Message-ID: <F4sFr8.HHG.0.-s@inmet.camb.inmet.com> (raw)
In-Reply-To: 76dhm3$rkq$1@nnrp1.dejanews.com

It seems clear that the stream attributes do not directly support the 
logging from multiple tasks, with interleaving occurring only
between "top-level" objects, as desired by this application.
Furthermore, they don't support reading without waiting.

However, it should be simple enough to build a generic package
which provides the desired functionality.

Each current "top-level" use of a stream attribute in the application
would be changed to be a call on a "read/write" or "input/output" routine of an 
appropriate instance of this generic package.  Such a routine would 
acquire a lock on the stream, invoke the corresponding stream attribute,
and release the lock.  

Furthermore, to support non-blocking read, you would need to add some 
kind of marker into the stream itself, I suspect, to be placed between 
"top-level" objects in the stream.  Then, when you call the non-blocking
"read" or "input" routine of the instance of this generic package,
it would call a routine of the underlying stream which would indicate
whether there is an "entire" top-level object already buffered up.
If not, the non-blocking read/input routine of the generic would
return a "not available" indicator.  If there is an entire top-level
object buffered up, the read/input routine would use the corresponding
stream attribute to read the data from the stream, confident that it
wouldn't block or get an end-of-file indication during the read.

--
-Tucker Taft   stt@averstar.com   http://www.averstar.com/~stt/
Technical Director, Distributed IT Solutions  (www.averstar.com/tools)
AverStar (formerly Intermetrics, Inc.)   Burlington, MA  USA




  reply	other threads:[~1998-12-30  0:00 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-12-30  0:00 Streams and Concurrency James S. Rogers
1998-12-29  0:00 ` David Botton
1998-12-30  0:00   ` dennison
1998-12-30  0:00     ` Tucker Taft [this message]
1998-12-30  0:00       ` dennison
1998-12-31  0:00         ` robert_dewar
1998-12-30  0:00       ` Robert I. Eachus
1998-12-30  0:00         ` Tucker Taft
1998-12-31  0:00         ` dennison
1998-12-31  0:00           ` robert_dewar
1998-12-31  0:00             ` dennison
1999-01-01  0:00               ` robert_dewar
1999-01-04  0:00           ` Robert I. Eachus
1998-12-30  0:00   ` James S. Rogers
1998-12-30  0:00     ` dennison
1998-12-30  0:00       ` James S. Rogers
1999-01-04  0:00       ` Robert I. Eachus
1998-12-31  0:00     ` Jean-Pierre Rosen
1998-12-31  0:00       ` dewar
1998-12-31  0:00         ` dennison
1999-01-04  0:00         ` Jean-Pierre Rosen
1999-01-04  0:00           ` robert_dewar
1998-12-31  0:00       ` dewar
1998-12-31  0:00         ` Ada-G, was " Tom Moran
1999-01-01  0:00           ` dewar
1999-01-01  0:00             ` Larry Kilgallen
1999-01-01  0:00           ` Brian Rogoff
1999-01-04  0:00             ` Robert I. Eachus
1999-01-08  0:00               ` Mats Weber
1999-01-08  0:00                 ` Robert I. Eachus
1999-01-08  0:00         ` Mats Weber
1999-01-08  0:00           ` Tucker Taft
1998-12-30  0:00 ` dennison
1998-12-30  0:00   ` Robert I. Eachus
1999-01-11  0:00   ` Bulk synchronous model for IO (was Re: Streams and Concurrency) Kevin Rigotti
replies disabled

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