1package com.runehive.game.engine.sync;
3import com.runehive.game.engine.sync.task.*;
4import com.runehive.game.world.entity.MobList;
5import com.runehive.game.world.entity.mob.npc.Npc;
6import com.runehive.game.world.entity.mob.player.Player;
8import java.util.concurrent.ExecutorService;
9import java.util.concurrent.Executors;
10import java.util.concurrent.Phaser;
14 private static final ExecutorService
executor = Executors
15 .newFixedThreadPool(Runtime.getRuntime().availableProcessors());
17 private final Phaser
phaser =
new Phaser(1);
34 phaser.arriveAndAwaitAdvance();
39 phaser.arriveAndAwaitAdvance();
44 phaser.arriveAndAwaitAdvance();
49 phaser.arriveAndAwaitAdvance();
static final ExecutorService executor
void synchronize(MobList< Player > players, MobList< Npc > npcs)
An Iterable implementation acting as a repository that holds instances of Entitys.
int size
The internal size of this list.
void forEach(Consumer<? super E > action)