mirror of
https://github.com/2006-Scape/apollo.git
synced 2026-07-06 08:40:03 +00:00
Use ArrayDeque, concurrency not important
This commit is contained in:
@@ -1,10 +1,10 @@
|
|||||||
package org.apollo.game.model;
|
package org.apollo.game.model;
|
||||||
|
|
||||||
|
import java.util.ArrayDeque;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Queue;
|
import java.util.Queue;
|
||||||
import java.util.concurrent.ConcurrentLinkedQueue;
|
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
import org.apollo.Service;
|
import org.apollo.Service;
|
||||||
@@ -99,12 +99,12 @@ public final class World {
|
|||||||
/**
|
/**
|
||||||
* The Queue of Npcs that have yet to be added to the repository.
|
* The Queue of Npcs that have yet to be added to the repository.
|
||||||
*/
|
*/
|
||||||
private final Queue<Npc> queuedNpcs = new ConcurrentLinkedQueue<>();
|
private final Queue<Npc> queuedNpcs = new ArrayDeque<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The Queue of Npcs that have yet to be removed from the repository.
|
* The Queue of Npcs that have yet to be removed from the repository.
|
||||||
*/
|
*/
|
||||||
private final Queue<Npc> oldNpcs = new ConcurrentLinkedQueue<>();
|
private final Queue<Npc> oldNpcs = new ArrayDeque<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This world's {@link RegionRepository}.
|
* This world's {@link RegionRepository}.
|
||||||
|
|||||||
Reference in New Issue
Block a user