2016-05-31 15:20:21 +00:00
|
|
|
package eu.siacs.conversations.utils;
|
|
|
|
|
|
|
|
public class ReplacingSerialSingleThreadExecutor extends SerialSingleThreadExecutor {
|
|
|
|
|
|
|
|
public ReplacingSerialSingleThreadExecutor(boolean prepareLooper) {
|
2017-11-16 14:53:03 +00:00
|
|
|
super(ReplacingSerialSingleThreadExecutor.class.getName(), prepareLooper);
|
2016-05-31 15:20:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public synchronized void execute(final Runnable r) {
|
|
|
|
tasks.clear();
|
|
|
|
super.execute(r);
|
|
|
|
}
|
|
|
|
}
|