X-Received: by 10.224.31.74 with SMTP id x10mr565932qac.2.1357247539867; Thu, 03 Jan 2013 13:12:19 -0800 (PST) Received: by 10.49.12.238 with SMTP id b14mr8476046qec.18.1357247539801; Thu, 03 Jan 2013 13:12:19 -0800 (PST) Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!us.feeder.erje.net!newsfeed.straub-nv.de!proxad.net!feeder1-2.proxad.net!209.85.216.87.MISMATCH!t8no643248qaj.0!news-out.google.com!k2ni4895qap.0!nntp.google.com!p13no646890qai.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.java.programmer Date: Thu, 3 Jan 2013 13:12:19 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=46.7.14.168; posting-account=iOAcbgoAAADC8J1iW-JMMSO74f5TboSg NNTP-Posting-Host: 46.7.14.168 References: <2b4da3ee-0ca3-456d-ae92-5b36e6e1a769@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Recommended way to handle ClosedByInterruptException? From: raphfrk@gmail.com Injection-Date: Thu, 03 Jan 2013 21:12:19 +0000 Content-Type: text/plain; charset=ISO-8859-1 Xref: csiph.com comp.lang.java.programmer:20928 The idea is to have a thread that handles the actual writing to disk. On shutdown, the thread is interrupted. It then writes any remaining data and then the thread dies. However, with this, if the a .map() call is made after the interrupt, the files closes.