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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,72daad0d97829ad6,start X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!postnews.google.com!35g2000cwc.googlegroups.com!not-for-mail From: "ldb" Newsgroups: comp.lang.ada Subject: Tasking, protected objects, Ada 95 RM Date: 18 Jul 2006 08:09:57 -0700 Organization: http://groups.google.com Message-ID: <1153235397.700369.134780@35g2000cwc.googlegroups.com> NNTP-Posting-Host: 206.210.81.52 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1153235401 2964 127.0.0.1 (18 Jul 2006 15:10:01 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 18 Jul 2006 15:10:01 +0000 (UTC) User-Agent: G2/0.2 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8.0.4) Gecko/20060508 Firefox/1.5.0.4,gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: 35g2000cwc.googlegroups.com; posting-host=206.210.81.52; posting-account=V3awPg0AAAB11Uk1Sshvlrxz0peUf-At Xref: g2news2.google.com comp.lang.ada:5767 Date: 2006-07-18T08:09:57-07:00 List-Id: I have a bit of tasking code that works pretty good. I'm still stress-testing it to put the stamp of approval on it, and have come across somethign that's a bit alarming. My code is meant to do a big parallel computation in a multithreaded fashion. I have a big buffer of data chunks to be processed, and a bunch of tasks feeding off that buffer processing data. Simple enough. During the buffers initialization, it has an entry call for "connect" where tasks can connect and it can keep track of how many tasks are currently "reading" from it. These tasks can then do "get_chunk". Pretty simple, so far so good. During the Task initilization, they have an "accept" statement from the main program that will point them to a buffer from which to read data. Inside this "accept" statement, they make a call to the buffer.connect function. This, in essence, is an atmoic "accept" statement making a calling to a protected types "entry" statement. This leads to the following alarming statement in the ada 95 RM: From: http://www.grammatech.com/rm95html-1.0/rm9x-09-05-01.html > During a protected action, it is a bounded error to invoke an operation that is potentially blocking. It goes on to define potentially blocking actions as, of course, an entry_call. Now, I've never had my code raise a bounded error or a program error. Here is a quick synopsis of my questions: 1) Am I misunderstanding this particular part of the manual, and it, in fact, doesn't apply to my code? 2) Should I be worried? 3) Will -gnatp prevent this exception from being raised?