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=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: border2.nntp.dca1.giganews.com!nntp.giganews.com!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!peer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!post02.iad.highwinds-media.com!fx23.iad.POSTED!not-for-mail From: Brad Moore User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: confusion about message passing between the tasks References: <175nrio3t8ima.vdesn04mg89f$.dlg@40tude.net> In-Reply-To: <175nrio3t8ima.vdesn04mg89f$.dlg@40tude.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: NNTP-Posting-Host: 68.145.219.148 X-Complaints-To: internet.abuse@sjrb.ca X-Trace: 1414358130 68.145.219.148 (Sun, 26 Oct 2014 21:15:30 UTC) NNTP-Posting-Date: Sun, 26 Oct 2014 21:15:30 UTC Date: Sun, 26 Oct 2014 15:15:29 -0600 X-Received-Bytes: 2979 X-Received-Body-CRC: 2887267485 X-Original-Bytes: 2897 Xref: number.nntp.giganews.com comp.lang.ada:190090 Date: 2014-10-26T15:15:29-06:00 List-Id: On 2014-10-26 2:42 PM, Dmitry A. Kazakov wrote: > An extreme scenario (unfortunately not Ada's annex E), a distributed system > could be decomposed around rendezvous between tasks running on physically > distributed nodes. This cannot be done with PO. > Why not with Ada's annex E? For instance, you can have a remote access to class-wide type that is an interfaces, including protected interfaces and task interfaces. I have some examples of Remote buffers that have task interfaces in the dequesterity project. For instance calling the Read or Write interface primitives can result in a rendezvous with a remote task object. The same can be done with remote protected interfaces, and I have working examples of that as well. eg. generic type Element_Type is private; pragma Preelaborable_Initialization (Element_Type); ... package Buffers is pragma Pure; ... type Remote_Buffer_Interface is limited interface; function Read (From : Remote_Buffer_Interface) return Element_Type is abstract; procedure Write (To : in out Remote_Buffer_Interface; Item : Element_Type) is abstract; ... end Buffers; ... package Buffers.Active is pragma Pure; pragma Remote_Types; -- Not needed since implied by pragma Pure task type Buffer (Maximum_Capacity : Count_Type; Task_Priority : System.Priority; Maximum_Read_Block : Timeout_In_Milliseconds_Type; Maximum_Write_Block : Timeout_In_Milliseconds_Type; Maximum_Exclusive_Lock_Time : Timeout_In_Microseconds_Type) is new Vectored_Buffer_Interface with pragma Priority (Task_Priority); overriding entry Read (Item : out Element_Type); overriding entry Write (Item : Element_Type); ... end Buffer; .... end Buffers.Active; Brad