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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,80b3e504140e89fd X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-06-24 10:57:29 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed1.cidera.com!Cidera!cyclone.columbus.rr.com!cyclone3.kc.rr.com!news3.kc.rr.com!twister.socal.rr.com.POSTED!not-for-mail Message-ID: <3D175DA2.D6F8F41D@san.rr.com> From: Darren New X-Mailer: Mozilla 4.77 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Config_Files proposal References: <3D0FAC67.A4861809@san.rr.com> <3D10B6B1.AFE9D4E8@san.rr.com> <3D10E046.E604231D@san.rr.com> <3D1204B5.4620F160@san.rr.com> <3D1215A8.719D39C5@nbi.dk> <3D123852.1040508@san.rr.com> <3D1289D2.9090107@telepath.com> <3D134669.5070000@san.rr.com> <3D173599.C515EE53@san.rr.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Mon, 24 Jun 2002 17:57:25 GMT NNTP-Posting-Host: 66.75.151.160 X-Complaints-To: abuse@rr.com X-Trace: twister.socal.rr.com 1024941445 66.75.151.160 (Mon, 24 Jun 2002 10:57:25 PDT) NNTP-Posting-Date: Mon, 24 Jun 2002 10:57:25 PDT Organization: RoadRunner - West Xref: archiver1.google.com comp.lang.ada:26660 Date: 2002-06-24T17:57:25+00:00 List-Id: Stephen Leake wrote: > Because you need "real locks", and you need to guard against all the > possible race conditions. The registry already does that. But you can eliminate a large number of race conditions by implementing a merge. You can change it from "if you start the same program twice, you're screwed" to "if you click the button on both instances in the length of time it takes to write the file, you're screwed." I think that's reasonable. You might not. > What's wrong with the answers I gave (besides "I don't like them" :)? Well, it's an opinion. > If we want to support this scenario (multiple processes reading and > writing to shared config file), we need "real locks". Sure, there's a race condition if you write the file between the time you check if it has changed and the time you write it out. I think that's a much smaller window than the window between the time you start the program and the time you exit it. -- Darren New San Diego, CA, USA (PST). Cryptokeys on demand. ** http://home.san.rr.com/dnew/DNResume.html ** ** http://images.fbrtech.com/dnew/ ** My brain needs a "back" button so I can remember where I left my coffee mug.