aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu/siacs/conversations/utils/ReplacingSerialSingleThreadExecutor.java
blob: dc8a0a82578dd35434c2af841e2fe58b7773453f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
package eu.siacs.conversations.utils;

public class ReplacingSerialSingleThreadExecutor extends SerialSingleThreadExecutor {

    public ReplacingSerialSingleThreadExecutor(boolean prepareLooper) {
        super(prepareLooper);
    }

    @Override
    public synchronized void execute(final Runnable r) {
        tasks.clear();
        super.execute(r);
    }
}