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=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,90108ed846e3f1bf,start X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!postnews.google.com!v39g2000pro.googlegroups.com!not-for-mail From: Adam Beneschan Newsgroups: comp.lang.ada Subject: Language lawyer question: task activation Date: Thu, 19 Feb 2009 09:37:31 -0800 (PST) Organization: http://groups.google.com Message-ID: NNTP-Posting-Host: 66.126.103.122 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: posting.google.com 1235065051 15526 127.0.0.1 (19 Feb 2009 17:37:31 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 19 Feb 2009 17:37:31 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: v39g2000pro.googlegroups.com; posting-host=66.126.103.122; posting-account=duW0ogkAAABjRdnxgLGXDfna0Gc6XqmQ User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.12) Gecko/20050922 Fedora/1.7.12-1.3.1,gzip(gfe),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:4676 Date: 2009-02-19T09:37:31-08:00 List-Id: Should this program deadlock? I don't think it should (and I think it should display "E1 accepted"), based on my understanding about when task activation is supposed to occur for the function result. But perhaps there's something about the relation between task activation and masters that I don't understand. Anyway, this hangs when I compile it with GNAT and run it---is this correct or not? -- thanks, Adam with Text_IO; procedure Test is task type TType is entry E1; end TType; task body TType is begin accept E1 do Text_IO.Put_Line ("E1 accepted"); end E1; end TType; function Func return TType is begin return X : TType; end Func; procedure Do_It (X : TType) is begin X.E1; end Do_It; begin Do_It (Func); end Test;