Added multiworld update support along with client-side support.
This commit is contained in:
parent
5b0171c459
commit
100f3e0590
8 changed files with 124 additions and 18 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue