Spaces:
Build error
Build error
File size: 688 Bytes
d46f4a3 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
package net.minecraft.util.thread;
public abstract class ReentrantBlockableEventLoop<R extends Runnable> extends BlockableEventLoop<R> {
private int reentrantCount;
public ReentrantBlockableEventLoop(String p_18765_) {
super(p_18765_);
}
@Override
public boolean scheduleExecutables() {
return this.runningTask() || super.scheduleExecutables();
}
protected boolean runningTask() {
return this.reentrantCount != 0;
}
@Override
public void doRunTask(R p_18769_) {
this.reentrantCount++;
try {
super.doRunTask(p_18769_);
} finally {
this.reentrantCount--;
}
}
} |