From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,115bda8caeda5fa4 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!news.glorb.com!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Does GNAT support a thread-free RTS? Date: Tue, 13 Sep 2011 14:18:38 +0200 Organization: cbb software GmbH Message-ID: References: <4e6f24c4$0$7629$9b4e6d93@newsspool1.arcor-online.net> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: FbOMkhMtVLVmu7IwBnt1tw.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 Xref: g2news1.google.com comp.lang.ada:20914 Date: 2011-09-13T14:18:38+02:00 List-Id: On Tue, 13 Sep 2011 11:39:16 +0200, Georg Bauhaus wrote: > On 13.09.11 10:30, Simon Wright wrote: > >> My prompt for asking this was a colleague who was used to Erlang and was >> complaining that GNAT's use of OS threads meant he would have to change >> his design mindset to not use thousands of tasks (Erlang processes). > > Just an idea: using mostly functions together with protected > channel objects should allow to use Ada in a way one > might be used to when passing Erlang data around. Unfortunately this does not work this way for many reasons (I have evaluated this design for our middleware and quickly dropped the idea). Protected objects are not tagged, you need inheritance to provide typed channels. You meed multiple dispatch to handle channel-type + value-type hierarchies. You need entries returning indefinite values. You need MI to have handles to the channels/devices implementing the interface of a protected object. > You write to some entry/procedure of a PO (pass data down > the channel) and read from some entry/function of the PO > (read from a channel). Add barriers as needed. Of course this can only be the transport layer. In our design at the application layer the channels are multiplexed into typed named channels, so that you can exchange data as if you had one channel per each variable and in full duplex mode of course. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de