comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: PubSub
Date: Sun, 1 Nov 2020 12:18:20 +0100	[thread overview]
Message-ID: <rnm5hs$7of$1@gioia.aioe.org> (raw)
In-Reply-To: 5f9e8fb6$0$16171$426a74cc@news.free.fr

On 01/11/2020 11:36, DrPi wrote:

> What I'm looking for is not inter-task communication. It is some sort of 
> message dispatcher (which is not thread safe). It is like a GUI event 
> manager but for custom events.
> A simple description here : https://wiki.wxpython.org/WxLibPubSub

You do not need that stuff. Even less if that is not task safe. On the 
context of the same task, it is just a call. You need no marshalled 
arguments because the call is synchronous and it must be synchronous 
because it is the same task. The very term "event" makes no sense if the 
task that emits it is the task that consumes it.

> This is very useful when using a GUI since it allows to directly send 
> messages to windows/dialogs/controls.

It is not useful, it is a mess, e.g. in GTK.

Anyway, the standard Ada library contains implementation of FIFO queues. 
If you want it 1-n rather that 1-1 use a blackboard instead of a FIFO.

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

  reply	other threads:[~2020-11-01 11:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-31 17:58 PubSub DrPi
2020-10-31 18:23 ` PubSub Jeffrey R. Carter
2020-11-01  8:51   ` PubSub DrPi
2020-10-31 18:38 ` PubSub Dmitry A. Kazakov
2020-11-01 10:36   ` PubSub DrPi
2020-11-01 11:18     ` Dmitry A. Kazakov [this message]
2020-11-01 14:11       ` PubSub DrPi
replies disabled

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