Arcturus-Community/src/main/java/com/eu/habbo/threading/HabboExecutorService.java

25 lines
650 B
Java
Raw Normal View History

2018-07-06 15:30:00 +02:00
package com.eu.habbo.threading;
import lombok.extern.slf4j.Slf4j;
2018-07-06 15:30:00 +02:00
import java.io.IOException;
import java.util.concurrent.ScheduledThreadPoolExecutor;
import java.util.concurrent.ThreadFactory;
@Slf4j
2019-05-26 20:14:53 +02:00
public class HabboExecutorService extends ScheduledThreadPoolExecutor {
2020-05-04 22:24:09 +02:00
2019-05-26 20:14:53 +02:00
public HabboExecutorService(int corePoolSize, ThreadFactory threadFactory) {
2018-07-06 15:30:00 +02:00
super(corePoolSize, threadFactory);
}
@Override
2019-05-26 20:14:53 +02:00
protected void afterExecute(Runnable r, Throwable t) {
2018-07-06 15:30:00 +02:00
super.afterExecute(r, t);
2019-05-26 20:14:53 +02:00
if (t != null && !(t instanceof IOException)) {
log.error("Error in HabboExecutorService", t);
2018-07-06 15:30:00 +02:00
}
}
}