anotherim/src/main/java/eu/siacs/conversations/utils/ReplacingSerialSingleThreadExecutor.java
2018-03-18 16:46:50 +01:00

15 lines
383 B
Java

package eu.siacs.conversations.utils;
public class ReplacingSerialSingleThreadExecutor extends SerialSingleThreadExecutor {
public ReplacingSerialSingleThreadExecutor(boolean prepareLooper) {
super(ReplacingSerialSingleThreadExecutor.class.getName(), prepareLooper);
}
@Override
public synchronized void execute(final Runnable r) {
tasks.clear();
super.execute(r);
}
}