Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 92596 invoked from network); 28 Oct 2009 12:38:16 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 28 Oct 2009 12:38:16 -0000 Received: (qmail 38520 invoked by uid 500); 28 Oct 2009 12:38:16 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 38431 invoked by uid 500); 28 Oct 2009 12:38:15 -0000 Mailing-List: contact java-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-dev@lucene.apache.org Delivered-To: mailing list java-dev@lucene.apache.org Received: (qmail 38423 invoked by uid 99); 28 Oct 2009 12:38:15 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Oct 2009 12:38:15 +0000 X-ASF-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [85.25.71.29] (HELO mail.troja.net) (85.25.71.29) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Oct 2009 12:38:13 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.troja.net (Postfix) with ESMTP id A4E8945F102 for ; Wed, 28 Oct 2009 13:37:49 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail.troja.net Received: from mail.troja.net ([127.0.0.1]) by localhost (megaira.troja.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id V-vRTQ3VQX6o for ; Wed, 28 Oct 2009 13:37:38 +0100 (CET) Received: from VEGA (unknown [134.102.249.78]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.troja.net (Postfix) with ESMTPSA id 36ECB45F0FF for ; Wed, 28 Oct 2009 13:37:38 +0100 (CET) From: "Uwe Schindler" To: References: <9ac0c6aa0910280453y1c35c80dr204713f202bde244@mail.gmail.com> Subject: RE: Thread.interrupt() Date: Wed, 28 Oct 2009 13:37:36 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <9ac0c6aa0910280453y1c35c80dr204713f202bde244@mail.gmail.com> Thread-Index: AcpXxWgXK1HH0u5OTRyAhi1/lwnAAAABUgnA X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 I have seen this yesterday, too (when coming around the assert Thread.holdsLock()), but I would not do that. How about defining a subclass of RuntimeException like InterruptedRuntimeException, so it does not need to be declared, but one could still catch it. Normally an interrupt inside Lucene would normally break a lot, so it is not done alone with catching it in user code? InterruptedException is only useful if you want to really control coexistence of threads or break IO operations, but I would not recommend to interrupt any foreign thread not part of your code (like a merging thread). If this was done by someone, we are fine with throwing a fatal error in the indexer. Maybe make it a subclass of IOException (because the indexing IO is interrupted)? Uwe ----- Uwe Schindler H.-H.-Meier-Allee 63, D-28213 Bremen http://www.thetaphi.de eMail: uwe@thetaphi.de > -----Original Message----- > From: Michael McCandless [mailto:lucene@mikemccandless.com] > Sent: Wednesday, October 28, 2009 12:54 PM > To: java-dev@lucene.apache.org > Subject: Thread.interrupt() > > As a followon to LUCENE-1573, we had stated that in 3.0 instead of > throwing RuntimeException when a Thread inside Lucene is interrupted, > we would throw InterruptedException. > > Do we want to do this? Technically I think it's the right thing to > do, but, I started to implement it and found that it basically results > in nearly every API now throwing InterruptedException (just like > IOException). > > Thoughts? > > Mike > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org > For additional commands, e-mail: java-dev-help@lucene.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org For additional commands, e-mail: java-dev-help@lucene.apache.org