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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII X-Google-Thread: 103376,9d3353604f79501f X-Google-Attributes: gid103376,public From: "Jean-Pierre Rosen" Subject: Re: Task Problem Date: 1999/04/12 Message-ID: <7eta1p$pp0$1@wanadoo.fr>#1/1 X-Deja-AN: 465538768 Content-Transfer-Encoding: 8bit References: <004601be8271$a408ad60$a20eb4d8@dhoossr> Content-Type: text/plain; charset="iso-8859-1" X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2120.0 X-Complaints-To: abuse@wanadoo.fr X-Trace: wanadoo.fr 923937657 26400 164.138.181.89 (12 Apr 1999 17:20:57 GMT) Organization: Adalog Mime-Version: 1.0 NNTP-Posting-Date: 12 Apr 1999 17:20:57 GMT Newsgroups: comp.lang.ada Date: 1999-04-12T17:20:57+00:00 List-Id: Matthew Heaney a �crit dans le message ... >"David C. Hoos, Sr." writes: > >> -----Original Message----- >> From: Sean Hill >> To: chat@gnat.com >> Date: Thursday, April 08, 1999 4:03 PM >> Subject: Task Problem >> >> >Any thoughts out there? >> > >> I know this is not a first step when porting from Ada83 to Ada95, but >> I have found no need for the rendezvous mechanism in any of my new >> designs, and have changed many rendezvous designs to use protected >> queues. > >I'll ditto that. It's possible to write Ada tasks as pure active >threads, with no entries. When you need to call a task, you call a >protected object instead that acts as an intermediary. > One big (huge in some cases) drawback of this approach is that you have no way to ensure automatic termination of servers. With this paradigm, every task is in the position of a client, and the PO work as the servers. You must send some kind of message to tell the tasks to terminate, but it is difficult to ensure that every task will terminate properly in every case of exception. Of course, this does not apply if all tasks are intended to be permanent (which often happens in real-time systems). --------------------------------------------------------- J-P. Rosen (Rosen.Adalog@wanadoo.fr) Visit Adalog's web site at http://perso.wanadoo.fr/adalog