[freenet-cvs] r20904 - branches/db4o/freenet/src/freenet/client/async
toad at freenetproject.org
toad at freenetproject.org
Tue Jul 1 12:52:58 UTC 2008
Author: toad
Date: 2008-07-01 12:52:58 +0000 (Tue, 01 Jul 2008)
New Revision: 20904
Modified:
branches/db4o/freenet/src/freenet/client/async/ClientRequestScheduler.java
Log:
Tweak priorities
Modified: branches/db4o/freenet/src/freenet/client/async/ClientRequestScheduler.java
===================================================================
--- branches/db4o/freenet/src/freenet/client/async/ClientRequestScheduler.java 2008-07-01 12:27:58 UTC (rev 20903)
+++ branches/db4o/freenet/src/freenet/client/async/ClientRequestScheduler.java 2008-07-01 12:52:58 UTC (rev 20904)
@@ -181,8 +181,8 @@
public void run(ObjectContainer container, ClientContext context) {
register(req, true, false, regme, probablyNotInStore);
}
-
- }, NativeThread.NORM_PRIORITY+1, false);
+ // NORM_PRIORITY so the completion (finishRegister()) runs before the next block does addPendingKeys().
+ }, NativeThread.NORM_PRIORITY, false);
return;
}
schedCore.addPendingKeys(getter, selectorContainer);
@@ -346,8 +346,8 @@
container.activate(g, 1);
g.onFailure(new LowLevelGetException(LowLevelGetException.DECODE_FAILED), token, container, context);
}
-
- }, NativeThread.NORM_PRIORITY, false);
+ // NORM_PRIORITY+1 as must run before finishRegister()
+ }, NativeThread.NORM_PRIORITY+1, false);
}
continue; // other keys might be valid
}
@@ -366,8 +366,8 @@
container.activate(g, 1);
g.onSuccess(b, true, t, container, context);
}
-
- }, NativeThread.NORM_PRIORITY, false);
+ // NORM_PRIORITY+1 as must run before finishRegister()
+ }, NativeThread.NORM_PRIORITY+1, false);
} else {
g.onSuccess(b, true, t, null, clientContext);
}
@@ -411,7 +411,7 @@
starter.wakeUp();
}
- }, NativeThread.NORM_PRIORITY, false);
+ }, NativeThread.NORM_PRIORITY+1, false);
}
} else {
// Register immediately.
More information about the cvs
mailing list