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,e81fd3a32a1cacd2 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!news.germany.com!news.ecp.fr!news.jacob-sparre.dk!pnx.dk!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Arguments for single-mutex-exclusion on protected types (Was: Does Ada tasking profit from multi-core cpus?) Date: Tue, 20 Mar 2007 12:51:54 -0500 Organization: Jacob's private Usenet server Message-ID: References: <5iGLh.26236$PF.18838@attbi_s21> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: jacob-sparre.dk 1174413022 26727 69.95.181.76 (20 Mar 2007 17:50:22 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Tue, 20 Mar 2007 17:50:22 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1807 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1807 Xref: g2news1.google.com comp.lang.ada:14566 Date: 2007-03-20T12:51:54-05:00 List-Id: "Jeffrey R. Carter" wrote in message news:B0ULh.28294$PF.23764@attbi_s21... > Randy Brukardt wrote: > > > > Nothing serious, but it's less than ideal: > > My concern was that you said it was impossible in Ada 95. It may not be > ideal, but it doesn't seem to be impossible. I was thinking about a solution that doesn't clutter the cliient's view of the library with (usually) irrelevant details (such as whether the library is implemented with protected objects). After all, information hiding is good! If you're willing to ignore that (and you are), then it certainly is possible. But I was thinking about a library that uses as the ceiling whatever the highest priority it is called with: that can't be implemented in Ada 95. (Such a library would not make anything having to do with priorities visible.) If you really care about priorities, then your solution is probably better (it allows more analyzability). Which just demonstrates that you can't just make something "task-safe". You have to answer the question of "task-safe for what?". And that tends to lead to families of libraries rather than an all-in-one solution (like Ada.Containers) - or impacts reusability. Randy.