From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.5-pre1 Path: eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!news.gegeweb.eu!gegeweb.org!usenet-fr.net!proxad.net!feeder1-2.proxad.net!cleanfeed1-b.proxad.net!nnrp1-1.free.fr!not-for-mail Subject: Re: PubSub Newsgroups: comp.lang.ada References: <5f9da5ac$0$4029$426a74cc@news.free.fr> <5f9e8fb6$0$16171$426a74cc@news.free.fr> From: DrPi <314@drpi.fr> Date: Sun, 1 Nov 2020 15:11:19 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: fr Content-Transfer-Encoding: 8bit Message-ID: <5f9ec209$0$3248$426a74cc@news.free.fr> Organization: Guest of ProXad - France NNTP-Posting-Date: 01 Nov 2020 15:11:21 CET NNTP-Posting-Host: 82.65.30.55 X-Trace: 1604239881 news-1.free.fr 3248 82.65.30.55:54926 X-Complaints-To: abuse@proxad.net Xref: reader02.eternal-september.org comp.lang.ada:60533 List-Id: Le 01/11/2020 à 12:18, Dmitry A. Kazakov a écrit : > 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. > Thanks Dmitry. I'll have a look at it.