Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: Knute Johnson Newsgroups: comp.lang.java.programmer Subject: Re: Recommended way to handle ClosedByInterruptException? Date: Thu, 03 Jan 2013 15:51:25 -0800 Organization: A noiseless patient Spider Lines: 16 Message-ID: References: <2b4da3ee-0ca3-456d-ae92-5b36e6e1a769@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Thu, 3 Jan 2013 23:51:26 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="9b3fcb0d22708969e4dc99e7aa0ef1f9"; logging-data="29326"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX194CXF/mhRT7xKSygCZrrPt" User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:17.0) Gecko/17.0 Thunderbird/17.0 In-Reply-To: Cancel-Lock: sha1:qSHRVTT8Y+tQgrAu0amlsidtbGw= Xref: csiph.com comp.lang.java.programmer:20934 On 1/3/2013 1:12 PM, raphfrk@gmail.com wrote: > 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. > I think the answer is self evident then, don't interrupt it. -- Knute Johnson