mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-02 17:32:03 +01:00
parent
0f66e39e46
commit
5a6e315a79
1 changed files with 1 additions and 5 deletions
|
@ -444,11 +444,7 @@ public class CraftScheduler implements BukkitScheduler {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void addTask(final CraftTask task) {
|
private void addTask(final CraftTask task) {
|
||||||
final AtomicReference<CraftTask> tail = this.tail;
|
final CraftTask tailTask = this.tail.getAndSet(task);
|
||||||
CraftTask tailTask = tail.get();
|
|
||||||
while (!tail.compareAndSet(tailTask, task)) {
|
|
||||||
tailTask = tail.get();
|
|
||||||
}
|
|
||||||
tailTask.setNext(task);
|
tailTask.setNext(task);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue