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,470860aa3e635a7 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!news.germany.com!nuzba.szn.dk!news.jacob-sparre.dk!pnx.dk!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: GNAT for MS Visual Studio Date: Tue, 9 Oct 2007 17:48:53 -0500 Organization: Jacob's private Usenet server Message-ID: References: <13duou81kg3sd1c@corp.supernews.com> <4xsl4zw3bp.fsf@hod.lan.m-e-leypold.de> <1191357491.860178.230380@22g2000hsm.googlegroups.com> <4702ADCC.7080209@obry.net> <1191439439.120567.172630@g4g2000hsf.googlegroups.com> <4703F02D.3030207@obry.net> <1191682021.844225.236870@g4g2000hsf.googlegroups.com> <4707A3D0.3070702@obry.net> <47088904.1090201@obry.net> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: jacob-sparre.dk 1191969961 23518 69.95.181.76 (9 Oct 2007 22:46:01 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Tue, 9 Oct 2007 22:46:01 +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.1896 Xref: g2news2.google.com comp.lang.ada:2394 Date: 2007-10-09T17:48:53-05:00 List-Id: "Simon Wright" wrote in message news:m2d4vo80jj.fsf@mac.com... > "Randy Brukardt" writes: > > > It would be easier to correctly use "protected" (task-safe) > > containers in concurrent uses than ones that only allowed a small > > amount of concurrency. Not everyone is an expert in concurrency, > > after all. > > Clearly one can protect a single container, either by wrapping it in > (for example) a protected object; or by providing an internal > mechanism. > > But it's been my experience that applications that involve containers > at all usually involve more than one container, in the same way that a > database application usually involves more than one table. With either > implementation technology, you have to preserve integrity. And in the > Ada case, that means locking more than one container object at the > same time. I think that depends on how coupled the application is. For instance, my spam filter has message tokens that move throughout the system, and the only synchronized containers needed are the queues for those tokens. Each task is waiting on a specific queue, operates on the token it receives, and then puts the token back on a particular queue. No multi-access needed here. I wrote the queues manually, but I probably would have used a protected container if one was available. So, the net effect is that YMMV: every application is different, and they have different needs. One size never fits all. At best, we can fit most. Randy.