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!aioe.org!.POSTED.QnTRC4x3WOQxzaUUaj2zKA.user.gioia.aioe.org!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: PubSub Date: Sun, 1 Nov 2020 12:18:20 +0100 Organization: Aioe.org NNTP Server Message-ID: References: <5f9da5ac$0$4029$426a74cc@news.free.fr> <5f9e8fb6$0$16171$426a74cc@news.free.fr> NNTP-Posting-Host: QnTRC4x3WOQxzaUUaj2zKA.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 Content-Language: en-US X-Notice: Filtered by postfilter v. 0.9.2 Xref: reader02.eternal-september.org comp.lang.ada:60532 List-Id: 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