comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Musings on RxAda
Date: Wed, 21 Oct 2015 21:35:17 +0200
Date: 2015-10-21T21:35:17+02:00	[thread overview]
Message-ID: <xp57t4ojedvk$.f2srcitko589.dlg@40tude.net> (raw)
In-Reply-To: 3a82a370-2175-4cf6-90e1-64fb19d794ff@googlegroups.com

On Wed, 21 Oct 2015 12:09:58 -0700 (PDT), Hadrien Grasland wrote:

> So you would essentially store a pipeline of data and operations in some
> container, then perform all of them on the same thread when the output of
> the pipeline is requested ?

I don't know your requirements. In a FIFO scenario, yes, the publisher
pushes the object. The subscriber pulls it out. In a blackboard scenario
(non-blocking) the publisher pushes the object and the subscribers scan the
blackboard for updates.

Of course in a modern typed language like Ada you would not mess with "data
and operations." There are objects for that. The type of the object
determines the operations.

> This seems much more complex to implement to me, since your operation
> queue needs to be able to store data of any type and operation function
> pointers, all in a type-safe way. As far as I can tell, you cannot use
> streams for that because a stream requires you to know what you are
> reading from it.

That is because you are trying to think about it in terms of C. Ada is not
C, luckily. It is quite straightforward to marshal T'Class objects with a
dispatching operation Do_It. And yes, it is as much easy to marshal handles
to reference-counted objects if objects are expected large (and you have
shared memory).

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


  reply	other threads:[~2015-10-21 19:35 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-14 14:30 Musings on RxAda Alejandro R.  Mosteo
2015-10-15 14:40 ` brbarkstrom
2015-10-21 11:45 ` Hadrien Grasland
2015-10-21 12:12 ` Hadrien Grasland
2015-10-21 13:35   ` Dmitry A. Kazakov
2015-10-21 16:18     ` Hadrien Grasland
2015-10-21 16:47       ` Dmitry A. Kazakov
2015-10-21 19:09         ` Hadrien Grasland
2015-10-21 19:35           ` Dmitry A. Kazakov [this message]
2015-10-21 21:04             ` Hadrien Grasland
2015-10-22 11:02               ` Alejandro R.  Mosteo
2015-10-22 12:33                 ` Dmitry A. Kazakov
2015-10-22 16:41                   ` Alejandro R.  Mosteo
2015-11-19 13:14 ` Jacob Sparre Andersen
replies disabled

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