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,7897733b1978b6a4 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.30.34 with SMTP id p2mr2308685pbh.4.1321623708516; Fri, 18 Nov 2011 05:41:48 -0800 (PST) Path: h5ni5633pba.0!nntp.google.com!news1.google.com!goblin2!goblin.stu.neva.ru!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Freezing a task Date: Fri, 18 Nov 2011 14:42:06 +0100 Organization: cbb software GmbH Message-ID: <1l2g4qmip451p$.zb4pjxjn3z0b$.dlg@40tude.net> References: <32992849.648.1321544004241.JavaMail.geo-discussion-forums@vbmh5> <32201299.75.1321579435782.JavaMail.geo-discussion-forums@yqbl36> <1ffqisv4jbhfl$.qceqrbo8tnl2$.dlg@40tude.net> <4ec64475$0$6575$9b4e6d93@newsspool3.arcor-online.net> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: FbOMkhMtVLVmu7IwBnt1tw.user.speranza.aioe.org Mime-Version: 1.0 X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 Xref: news1.google.com comp.lang.ada:18969 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Date: 2011-11-18T14:42:06+01:00 List-Id: On Fri, 18 Nov 2011 12:41:41 +0100, Georg Bauhaus wrote: > On 18.11.11 11:05, Simon Wright wrote: >> "Dmitry A. Kazakov" writes: >> >>> however, I would use an exception rather than output parameter >> >> I like that. Will give it strong consideration for a design update (of >> course, it wouldn't do for a SPARK implementation; personally I'd like >> to see SPARK allow provably-handled exceptions (though I suspect the >> problem is with "provably")). > > In case I want an interrupt to stop (and release) the task, > will an exception, such as Pending_Abort from the example, > work? Since the entry point Get is to be called on the context of a task, Pending_Abort will never propagate on the context of an interrupt. > When the task then calls an entry such as Get from the example, > and the entry raises an exception, it will have an effect. But then, > this will interrupt the task only later... This is exactly the implementation. BTW this is also the case for the terminate alternative, which is accepted when the task is ready to accept it. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de