A quick note on thread usage like that in Slide, shouldn't those
threads be daemon threads?
I ask because sometimes our apps don't shutdown using shutdown.sh
unless we add the -force parameter could be related to Slide since we
have changed all our threading to daemons so no matter what they are
killable...
-Eiki
p.s.
Anyone have a clue how to solve my TooManyClauses problem I posted
earlier?
On Apr 11, 2007, at 3:59 PM, [EMAIL PROTECTED] wrote:
Author: ozeigermann
Date: Wed Apr 11 08:59:18 2007
New Revision: 527546
URL: http://svn.apache.org/viewvc?view=rev&rev=527546
Log:
Quick hack to prevent spawning of innumerous threads when there is
no correct check for a connected store
Modified:
jakarta/slide/trunk/src/stores/org/apache/slide/index/lucene/
Index.java
Modified: jakarta/slide/trunk/src/stores/org/apache/slide/index/
lucene/Index.java
URL: http://svn.apache.org/viewvc/jakarta/slide/trunk/src/stores/
org/apache/slide/index/lucene/Index.java?
view=diff&rev=527546&r1=527545&r2=527546
======================================================================
========
--- jakarta/slide/trunk/src/stores/org/apache/slide/index/lucene/
Index.java (original)
+++ jakarta/slide/trunk/src/stores/org/apache/slide/index/lucene/
Index.java Wed Apr 11 08:59:18 2007
@@ -171,11 +171,19 @@
public void start() {
if (configuration.indexAsynchron) {
- this.indexThread = new JobRunner();
- this.indexThread
- .setName("Indexing Thread (" + this.indexName +
")");
-
this.indexThread.setPriority(configuration.getPriority());
- this.indexThread.start();
+ if (this.indexThread != null) {
+ // this really should be WARNING, but this can get
called so
+ // many times
+/* getLogger().log(
+ "Indexing thread has already been started!
Not starting a new one!",
+ Logger.WARNING);
+*/
+ } else {
+ this.indexThread = new JobRunner();
+ this.indexThread.setName("Indexing Thread (" +
this.indexName + ")");
+ this.indexThread.setPriority
(configuration.getPriority());
+ this.indexThread.start();
+ }
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]