Project

General

Profile

Bug #2161

Application Threadpool gets confused on interruption

Added by Henning Blohm 11 months ago. Updated about 2 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
z2-core
Target version:
Start date:
02.01.2024
Due date:
% Done:

0%

Estimated time:
origin:

Description

When interrupting a thread in the thread pool, it will terminate but still be in the pool. This happens in WorkerThread.java:


 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

The code is super outdated and far to complex.

Acceptance Criteria

  • The thread pool implementation is based on the java.util.concurrency executors (✓)
  • JMX names are preserved (✓)
  • The fix is merged into master (✓)
#1

Updated by Henning Blohm 11 months ago

  • Target version changed from 3.0 to 2.9.5
#2

Updated by Henning Blohm 11 months ago

  • Description updated (diff)
#3

Updated by Henning Blohm 11 months ago

  • Target version changed from 2.9.5 to 3.0
#4

Updated by Henning Blohm 11 months ago

  • Status changed from New to In Progress
#5

Updated by Henning Blohm 7 months ago

  • Target version changed from 3.0 to 2.10.1
#6

Updated by Henning Blohm 3 months ago

  • Description updated (diff)
#7

Updated by Henning Blohm 3 months ago

  • Description updated (diff)
#8

Updated by Henning Blohm 3 months ago

  • Description updated (diff)
#9

Updated by Henning Blohm 3 months ago

  • Status changed from In Progress to Feedback
#10

Updated by Henning Blohm about 2 months ago

  • Status changed from Feedback to Resolved

Also available in: Atom PDF