ThreadlessExecutor unable to handle all exceptions throwed by task.
org.apache.dubbo.common.threadpool.ThreadlessExecutor
public void waitAndDrain() throws InterruptedException {
if (finished) {
return;
}
Runnable runnable = queue.take();
synchronized (lock) {
waiting = false;
runnable.run();
}
runnable = queue.poll();
while (runnable != null) {
try {
runnable.run();
} catch (Throwable t) {
logger.info(t);
}
runnable = queue.poll();
}
finished = true;
}
@Override
public void execute(Runnable runnable) {
synchronized (lock) {
if (!waiting) {
sharedExecutor.execute(runnable);
} else {
queue.add(runnable);
}
}
}
When execute tasks takes from queue or tasks directly executed by sharedExecutor, the exception throwed by task cannot be handled properly. Additional, tasks polled from queue are surround by exception handler.
ThreadlessExecutor unable to handle all exceptions throwed by task.
org.apache.dubbo.common.threadpool.ThreadlessExecutor
When execute tasks takes from queue or tasks directly executed by sharedExecutor, the exception throwed by task cannot be handled properly. Additional, tasks polled from queue are surround by exception handler.