comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Understanding Visibility
Date: Mon, 17 Sep 2012 23:19:14 +0200
Date: 2012-09-17T23:19:14+02:00	[thread overview]
Message-ID: <82c5e4984vf2$.1snxa3p5dlpxf$.dlg@40tude.net> (raw)
In-Reply-To: f64b145d-f2ad-470d-a6fb-dd3d666d481e@googlegroups.com

On Mon, 17 Sep 2012 13:42:27 -0700 (PDT), tonyg wrote:

> I needed to log some stuff from several tasks in one program. So I wrote a
> little logging package. I used a package containing several
> text_io.file_types followed by a protected object to make sure the file
> operations were not interfered with. 

It is an error to do I/O from a protected action, since I/O is a
potentially blocking operation.

You should either use a task (AKA monitor) or else a protected object
implementing a mutex (using a controlled holder object, of course).

> However when things were passed through to inside the protected object I
> found that the file was not taking the information being passed to it. Can
> anyone explain this to me, as I think the file should be visible.

You should always post a working code illustrating the problem.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de



  reply	other threads:[~2012-09-21  1:13 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-17 20:42 Understanding Visibility tonyg
2012-09-17 21:19 ` Dmitry A. Kazakov [this message]
2012-09-18  6:36 ` Thomas Løcke
2012-09-18 13:47   ` tonyg
2012-09-18 14:00     ` tonyg
2012-09-18 14:36       ` Thomas Løcke
2012-09-19  1:32       ` netiquette Stephen Leake
2012-09-18 15:17     ` Understanding Visibility xavier grave
2012-09-18  7:52 ` tonyg
replies disabled

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