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,57893ac51069959a X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Received: by 10.68.73.229 with SMTP id o5mr9143987pbv.7.1327454102829; Tue, 24 Jan 2012 17:15:02 -0800 (PST) Path: lh20ni220583pbb.0!nntp.google.com!news2.google.com!postnews.google.com!iu7g2000pbc.googlegroups.com!not-for-mail From: Adam Beneschan Newsgroups: comp.lang.ada Subject: Re: "C - like: THIS" pointer to a task type inside a task function Date: Tue, 24 Jan 2012 16:46:56 -0800 (PST) Organization: http://groups.google.com Message-ID: References: <3deb0849-ec07-4cc5-b722-a253b614feee@rk3g2000pbb.googlegroups.com> NNTP-Posting-Host: 66.126.103.122 Mime-Version: 1.0 X-Trace: posting.google.com 1327454102 32258 127.0.0.1 (25 Jan 2012 01:15:02 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 25 Jan 2012 01:15:02 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: iu7g2000pbc.googlegroups.com; posting-host=66.126.103.122; posting-account=duW0ogkAAABjRdnxgLGXDfna0Gc6XqmQ User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-Header-Order: ARLUEHNKC X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; WOW64; Trident/4.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.5.21022; .NET CLR 3.5.30729; .NET CLR 3.0.30618; .NET4.0C),gzip(gfe) Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Date: 2012-01-24T16:46:56-08:00 List-Id: On Jan 24, 4:42=A0pm, Adam Beneschan wrote: > A better idea (in my opinion) is to set things up so that the client > will *call* an entry, rather than accept an entry, when it's ready to > wait for the request to be completed. =A0It can't be an entry in the > server, though, since there's no construct in Ada to "accept" an entry > just from one specific task. =A0In Ada 83, I would have had the server > create a new, small "helper" task for this purpose; the server would > create a new task when the request is initiated, and later it would > tell that task when the request can be completed, and the client would > wait on that task. =A0Now, protected types can be used for a similar > purpose.... OK, I didn't realize it at the time, but this is pretty much the same thing Dmitry suggested. Just to give credit where it's due... -- Adam