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.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,d87fcae02ce5c10a X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews2.google.com!not-for-mail From: chad.rmeiners@gmail.com (Chad R. Meiners) Newsgroups: comp.lang.ada Subject: Re: Synchronizing on multiple distinict resources Date: 10 Aug 2004 11:51:11 -0700 Organization: http://groups.google.com Message-ID: <782e906e.0408101051.5e122af0@posting.google.com> References: <7ebaa24d.0408021054.4abc6e73@posting.google.com> NNTP-Posting-Host: 12.40.93.132 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1092163872 5539 127.0.0.1 (10 Aug 2004 18:51:12 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 10 Aug 2004 18:51:12 +0000 (UTC) Xref: g2news1.google.com comp.lang.ada:2655 Date: 2004-08-10T11:51:11-07:00 List-Id: "Dmitry A. Kazakov" wrote in message news:... > Standard pattern is to prioritize resources and to seize them in that > order. *nod* This is what I have had to do in the past. Fortunately it seems that I can often design away many cases that at first glance seem to need to use multiple resources. > One could also speculate about further Ada extensions towards: Such speculation would be welcome ;) For instance I became more interested in the problem with sychronizing upon multiple resources after reading a colleague's paper. http://www.cse.msu.edu/~behrends/universe/fse00.pdf Which handles multiple synchronizations with synchronization contracts. > 1. multiple protected actions / rendezvous (to queue to two chopsticks) Perhaps something like procedure Eat(Left, Right : in out Chop_Stick) is Synchronize Left and Right; -- Exclusive access until end of procedure begin ... end Eat; > 2. extensible protected objects / tasks with multiple inheritance (to > inherit a pair of chopsticks twice from a chopstick) Not sure how this would work. -CRM