aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart/messenger/utils/ReplacingSerialSingleThreadExecutor.java
blob: 22ad7f7a4effffead81a7f4a6ca4532f4ef43ba8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
package de.pixart.messenger.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);
    }
}