Author: toad
Date: 2008-02-26 16:05:06 +0000 (Tue, 26 Feb 2008)
New Revision: 18166
Modified:
trunk/freenet/src/freenet/client/async/ClientRequestScheduler.java
trunk/freenet/src/freenet/client/async/SplitFileFetcher.java
Log:
Remove yield()'s, they are unnecessary on both supported Linuxes and Windows.
Modified: trunk/freenet/src/freenet/client/async/ClientRequestScheduler.java
===================================================================
--- trunk/freenet/src/freenet/client/async/ClientRequestScheduler.java
2008-02-26 15:37:52 UTC (rev 18165)
+++ trunk/freenet/src/freenet/client/async/ClientRequestScheduler.java
2008-02-26 16:05:06 UTC (rev 18166)
@@ -241,11 +241,6 @@
if(block != null) {
if(logMINOR) Logger.minor(this,
"Can fulfill "+req+" ("+tok+") immediately from store");
getter.onSuccess(block, true,
tok, this);
- // FIXME unfortunately this
seems to be necessary on *nix to prevent
- // critical threads from
starving: sadly thread priorities only work on
- // Windows and as of linux
2.6.23, fair scheduling does not ensure that
- // the critical threads (those
which set MAX_PRIORITY) get enough CPU time.
- Thread.yield();
} else {
anyValid = true;
}
Modified: trunk/freenet/src/freenet/client/async/SplitFileFetcher.java
===================================================================
--- trunk/freenet/src/freenet/client/async/SplitFileFetcher.java
2008-02-26 15:37:52 UTC (rev 18165)
+++ trunk/freenet/src/freenet/client/async/SplitFileFetcher.java
2008-02-26 16:05:06 UTC (rev 18166)
@@ -187,11 +187,6 @@
SplitFileFetcherSegment s = segments[i];
long max = (finalLength < 0 ? 0 : (finalLength
- bytesWritten));
bytesWritten += s.writeDecodedDataTo(os, max);
- // FIXME unfortunately this seems to be
necessary on *nix to prevent
- // critical threads from starving: sadly thread
priorities only work on
- // Windows and as of linux 2.6.23, fair
scheduling does not ensure that
- // the critical threads (those which set
MAX_PRIORITY) get enough CPU time.
- Thread.yield();
}
} catch (IOException e) {
throw new FetchException(FetchException.BUCKET_ERROR,
e);