Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #20934

Re: Recommended way to handle ClosedByInterruptException?

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 <nospam@knutejohnson.com>
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 <kc55ht$ske$1@dont-email.me> (permalink)
References <2b4da3ee-0ca3-456d-ae92-5b36e6e1a769@googlegroups.com> <kc2v2b$1vq$1@dont-email.me> <cbd2def3-2198-49a5-b065-c81b26b7f82f@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 <cbd2def3-2198-49a5-b065-c81b26b7f82f@googlegroups.com>
Cancel-Lock sha1:qSHRVTT8Y+tQgrAu0amlsidtbGw=
Xref csiph.com comp.lang.java.programmer:20934

Show key headers only | View raw


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

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Recommended way to handle ClosedByInterruptException? raphfrk@gmail.com - 2013-01-02 18:43 -0800
  Re: Recommended way to handle ClosedByInterruptException? Knute Johnson <nospam@knutejohnson.com> - 2013-01-02 19:48 -0800
    Re: Recommended way to handle ClosedByInterruptException? raphfrk@gmail.com - 2013-01-03 13:12 -0800
      Re: Recommended way to handle ClosedByInterruptException? Knute Johnson <nospam@knutejohnson.com> - 2013-01-03 15:51 -0800

csiph-web