comp.lang.ada
 help / color / mirror / Atom feed
From: William FRANCK <william.franck@free.fr>
Subject: Re: How to transfer Class-Wide object to a Task ?
Date: Mon, 14 Oct 2019 22:48:32 +0200
Date: 2019-10-14T22:48:32+02:00	[thread overview]
Message-ID: <5da4df20$0$31420$426a74cc@news.free.fr> (raw)
In-Reply-To: 790bc738-752e-48db-8a8b-b266cffd784f@googlegroups.com

On 2019-10-14 19:55:22 +0000, Shark8 said:

> On Monday, October 14, 2019 at 1:41:55 PM UTC-6, William FRANCK wrote:
>> Hey all !
>> Here is a nice issue I have with Ada (GNAT 2012) when trying to do OO
>> dispatching with streams in different tasks ...
> 
> Generic_Dispatching_Constructor?
> https://www.adaic.org/resources/add_content/standards/05rat/html/Rat-2-6.html
> 
> Can you give us the actual use-case you're trying to accomplish?

Yes! That's precisly what I'm using to read an existing datafile 
containing records of 10  different structure (and size), then write 
each record back to another stream.

Purpose is to anonymize some of the fields of differently structured records.

Happilly first characters are containing the recordtype name, so I use 
it as External_Tag and can use the OO dispatching of 'Input and 
'Output; selecting the correct 'Read and 'Write.

Allin one program (no multitasking) is OK.
My issue, is that I wanted to gain some speed by having 2 (Ada) tasks : 
one for reading, one for writing.

I did a simple Proof of Concept for the multitasking by transfering an 
IntegerObject. This is OK.

When I replace my Integer by a class-Wide object, I do find the clue to 
make it correct.

  reply	other threads:[~2019-10-14 20:48 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-14 19:41 How to transfer Class-Wide object to a Task ? William FRANCK
2019-10-14 19:55 ` Shark8
2019-10-14 20:48   ` William FRANCK [this message]
2019-10-14 22:01     ` Shark8
2019-10-15  5:13       ` William FRANCK
2019-10-14 19:58 ` Dmitry A. Kazakov
2019-10-14 20:58   ` William FRANCK
2019-10-15  4:40     ` Per Sandberg
2019-10-15  5:40       ` William FRANCK
2019-10-16 20:04       ` William FRANCK
2019-10-16 23:43         ` Anh Vo
2019-10-17  9:28         ` William FRANCK
2019-10-17 10:00           ` Dmitry A. Kazakov
2019-10-17 10:45             ` William FRANCK
2019-10-15  7:21     ` Dmitry A. Kazakov
2019-10-15 14:31       ` Optikos
2019-10-15 19:41         ` William FRANCK
2019-10-15 20:03           ` Shark8
2019-10-14 20:21 ` William FRANCK
2019-10-14 20:32   ` Dmitry A. Kazakov
2019-10-14 21:04     ` William FRANCK
2019-10-14 21:57   ` Shark8
2019-10-15  5:43     ` William FRANCK
replies disabled

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