comp.lang.ada
 help / color / mirror / Atom feed
From: dennison@telepath.com
Subject: Re: What good are File_Access's?
Date: 1998/07/20
Date: 1998-07-20T00:00:00+00:00	[thread overview]
Message-ID: <6p0d97$o7t$1@nnrp1.dejanews.com> (raw)
In-Reply-To: dewar.900954709@merv

In article <dewar.900954709@merv>,
  dewar@merv.cs.nyu.edu (Robert Dewar) wrote:
> <<Ahhhh. That's the answer I was looking for.
> I didn't consider that as a possibility because that method of saving off the
> Current_Output won't work in a multi-tasking environment. You'd need some kind
> of "atomic" save-and-change operation. Since that is %90 of the Ada programs I
> have ever worked on, that doesn't make it too useful.
> >>
>
> Well it simply needs protecting in a multi-tasking environment. You generalloy
> need to have some control over Text_IO anyway (for example, you certainly
> cannot do Put_Line operations on standard output at the same time from
> two separate tasks without proper synchronization.

True. But having to manage task access to the same *file* is a little
different than having to manage task access to the global default for all of
Text_IO. The former can be accomplished by the simple rule "only task X gets
to access file Y" (or by more complicated means). The latter ... hmmm ... it
would be grisly.

You'd really need a default for each task. I guess you could reimplement all
of Text_IO as a task, using Caller ID's to index into an array of defaults.
Yuk.

Yeah, its basicly useless.

T.E.D.

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum




      reply	other threads:[~1998-07-20  0:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-07-17  0:00 What good are File_Access's? dennison
1998-07-17  0:00 ` Tucker Taft
1998-07-18  0:00 ` Robert Dewar
1998-07-20  0:00   ` dennison
1998-07-20  0:00     ` Robert Dewar
1998-07-20  0:00       ` dennison [this message]
replies disabled

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