Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!us.feeder.erje.net!news2.arglkargh.de!news.mixmin.net!aioe.org!.POSTED!not-for-mail From: Roedy Green Newsgroups: comp.lang.java.programmer Subject: Re: single instance Date: Fri, 18 Jan 2013 01:47:55 -0800 Organization: Canadian Mind Products Lines: 32 Message-ID: References: <50e8eb1f$0$284$14726298@news.sunsite.dk> Reply-To: Roedy Green NNTP-Posting-Host: K2Qzzs3EAqXk5RLzfhxcSw.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org X-Notice: Filtered by postfilter v. 0.8.2 X-Newsreader: Forte Agent 6.00/32.1186 Xref: csiph.com comp.lang.java.programmer:21514 On Sat, 05 Jan 2013 19:49:08 -0800, Knute Johnson wrote, quoted or indirectly quoted someone who said : >> // if we are seeing our own packet, do nothing >> if ( theirTime == myTime ) >> { >> >> >> Who can see a concurrency problem in that logic? I have been working on polishing Knute's code. Mostly I have been adding informal comments and renaming to help myself understand how it works. I have not run it yet, but it is getting close to a test. see https://wush.net/svn/mindprod/com/mindprod/singleinstance/SingleInstance.java I have added UUIDs to break the tie for equal start times. I have added app ids so different apps can share the same port. I have added the ability avoid several different apps. I have added the ability to permit two apps to run, so long as they run on different files. -- Roedy Green Canadian Mind Products http://mindprod.com The first 90% of the code accounts for the first 90% of the development time. The remaining 10% of the code accounts for the other 90% of the development time. ~ Tom Cargill Ninety-ninety Law