Added multiworld update support along with client-side support.

This commit is contained in:
FrozenCow 2011-02-13 01:19:47 +01:00
parent 5b0171c459
commit 100f3e0590
8 changed files with 124 additions and 18 deletions

View file

@ -11,7 +11,7 @@ public class UpdateQueue {
private static final int maxUpdateAge = 120000;
public void pushUpdate(Object obj) {
public synchronized void pushUpdate(Object obj) {
long now = System.currentTimeMillis();
long deadline = now - maxUpdateAge;
synchronized (lock) {
@ -27,7 +27,7 @@ public class UpdateQueue {
private ArrayList<Object> tmpupdates = new ArrayList<Object>();
public Object[] getUpdatedObjects(long since) {
public synchronized Object[] getUpdatedObjects(long since) {
long now = System.currentTimeMillis();
long deadline = now - maxUpdateAge;
Object[] updates;