comp.lang.ada
 help / color / mirror / Atom feed
From: Dmitry A. Kazakov <mailbox@dmitry-kazakov.de>
Subject: Re: new_line in a put_line
Date: Thu, 05 Dec 2002 10:44:16 +0100
Date: 2002-12-05T10:44:16+01:00	[thread overview]
Message-ID: <lh7uuukv1pkj6ulfcdmernh6m602k8j89f@4ax.com> (raw)
In-Reply-To: mailman.1039069442.7052.comp.lang.ada@ada.eu.org

On Thu, 5 Dec 2002 07:16:10 +0100 (MET), "Grein, Christoph"
<christoph.grein@eurocopter.com> wrote:

>> You might also pack seizing the mutex into a "proxy" object
>> (File_Channel):
>> 
>>    type File_Channel is limited private;
>>    procedure Put (File : in out File_Channel; Text : String);
>>    procedure Put_Line (File : in out File_Channel; Text : String);
>>    procedure New_Line (File : in out File_Channel; Text : String);
>> ...
>> private
>>    type File_Channel is
>>       new Ada.Finalization.Limited_Controlled with null record;
>>    procedure Initialize (File : in out File_Channel);
>>    procedure Finalize (File : in out File_Channel);
>> 
>> Initialize would seize the mutex, Finalize would release it. Thus only
>> one instance of File_Channel may exist at a time.
>
>No, nothing prevents you from declaring lots of File_Channel objects concurrently, even 
>arrays of them.

OK, bad wording, I admit. Under "exists" I actually meant "exists at
run-time and is fully initialized".

---
Regards,
Dmitry Kazakov
www.dmitry-kazakov.de



  reply	other threads:[~2002-12-05  9:44 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-12-05  6:16 new_line in a put_line Grein, Christoph
2002-12-05  9:44 ` Dmitry A. Kazakov [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-12-05  6:28 Grein, Christoph
2002-12-05 14:19 ` Stephen Leake
2002-12-04 10:03 Grein, Christoph
2002-12-03 11:52 Grein, Christoph
2002-12-04  9:39 ` Fraser Wilson
2002-12-02  5:36 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
2002-12-05 18:11                   ` Warren W. Gay VE3WWG
2002-12-02 15:49 ` Robert A Duff
replies disabled

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