2018-07-06 15:30:00 +02:00
|
|
|
package com.eu.habbo.threading;
|
|
|
|
|
2023-01-10 00:04:13 +01:00
|
|
|
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;
|
|
|
|
|
2023-01-10 00:04:13 +01:00
|
|
|
@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)) {
|
2023-01-10 00:04:13 +01:00
|
|
|
log.error("Error in HabboExecutorService", t);
|
2018-07-06 15:30:00 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|