|
|
|
@ -128,12 +128,11 @@ public class kelondroMap {
|
|
|
|
|
|
|
|
|
|
class writeQueue extends Thread {
|
|
|
|
|
|
|
|
|
|
LinkedList queue;
|
|
|
|
|
private LinkedList queue = new LinkedList();
|
|
|
|
|
boolean run;
|
|
|
|
|
|
|
|
|
|
public writeQueue() {
|
|
|
|
|
run = true;
|
|
|
|
|
queue = new LinkedList();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void stack(String key) {
|
|
|
|
@ -144,12 +143,19 @@ public class kelondroMap {
|
|
|
|
|
workoff(key);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public synchronized void workoff() {
|
|
|
|
|
if (queue.size() > 0) workoff((String) queue.removeFirst());
|
|
|
|
|
public void workoff() {
|
|
|
|
|
String newKey = null;
|
|
|
|
|
synchronized (this.queue) {
|
|
|
|
|
if (this.queue.size() > 0) {
|
|
|
|
|
newKey = (String) this.queue.removeFirst();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (newKey != null) workoff(newKey);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public synchronized void dequeue(String key) {
|
|
|
|
|
public void dequeue(String key) {
|
|
|
|
|
// take out one entry
|
|
|
|
|
synchronized (this.queue) {
|
|
|
|
|
ListIterator i = queue.listIterator();
|
|
|
|
|
String k;
|
|
|
|
|
while (i.hasNext()) {
|
|
|
|
@ -160,6 +166,7 @@ public class kelondroMap {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void workoff(String key) {
|
|
|
|
|
//System.out.println("kelondroMap: workoff(" + dyn.entryFile.name() + ") " + key);
|
|
|
|
|