conversations-classic/src/main/java/eu/siacs/conversations/utils/ReplacingSerialSingleThreadExecutor.java

15 lines
416 B
Java
Raw Normal View History

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);
}
}