Bug #2161
Updated by Henning Blohm 3 months ago
When interrupting a thread in the thread pool, it will terminate but still be in the pool. This happens in WorkerThread.java: <pre><code> if (this.wm.taskCompleted(this)) { synchronized (this) { if (!this.kicked) { // only if not having been kicked between being put into // the pool and entering this block waiting = true; try { this.wait(); } catch (InterruptedException e) { logger.fine("Thread interrupted: "+this); } finally { this.waiting = false; } } else this.kicked = false; } } else synchronized (this) {} // also to comply to the memory model </code></pre> The code is super outdated and far to complex. h2. Acceptance Criteria * The ThreadPool code is simplified with less concurrency spaghetti code * When a thread pool implementation is based on interrupted, it is terminating and remove from the java.util.concurrency executors (✓) pool * JMX names are preserved (✓) * The fix is merged into master * JMX names are preserved