Update of /cvsroot/freenet/freenet/src/freenet
In directory sc8-pr-cvs1:/tmp/cvs-serv4061/src/freenet
Modified Files:
Ticker.java
Log Message:
Smaller locking scope
Index: Ticker.java
===================================================================
RCS file: /cvsroot/freenet/freenet/src/freenet/Ticker.java,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -w -r1.27 -r1.28
--- Ticker.java 16 Oct 2003 06:30:33 -0000 1.27
+++ Ticker.java 27 Oct 2003 14:36:00 -0000 1.28
@@ -122,7 +122,7 @@
* Like add(), but the time is given as an absolute in milliseconds
* of the epoch (System.currentTimeMillis() format).
*/
- public final synchronized void addAbs(long time, MessageObject mo) {
+ public final void addAbs(long time, MessageObject mo) {
long x = System.currentTimeMillis();
if(time < x) time = x;
@@ -133,14 +133,14 @@
Core.logger.log(this, "scheduling " + evt +
" to run at " + time + " at "
+ x,
new Exception("debug"),
Logger.DEBUG);
-
+ synchronized (this) {
evt.heapElement = events.put(evt);
if (mo instanceof Schedulable) {
((Schedulable) mo).getToken(evt);
}
-
this.notify(); // wake up ticker thread
+ }
}
public void run() {
_______________________________________________
cvs mailing list
[EMAIL PROTECTED]
http://dodo.freenetproject.org/cgi-bin/mailman/listinfo/cvs