Author: toad
Date: 2007-08-11 20:40:46 +0000 (Sat, 11 Aug 2007)
New Revision: 14637
Modified:
trunk/freenet/src/freenet/client/async/SingleFileFetcher.java
Log:
Schedule archive fetches off thread
Modified: trunk/freenet/src/freenet/client/async/SingleFileFetcher.java
===================================================================
--- trunk/freenet/src/freenet/client/async/SingleFileFetcher.java
2007-08-11 20:24:24 UTC (rev 14636)
+++ trunk/freenet/src/freenet/client/async/SingleFileFetcher.java
2007-08-11 20:40:46 UTC (rev 14637)
@@ -419,7 +419,7 @@
}
// **FIXME** Is key in the call to
SingleFileFetcher here supposed to be this.key or the same key used in the try
block above? MultiLevelMetadataCallback.onSuccess() below uses this.key, thus
the question
- SingleFileFetcher f = new
SingleFileFetcher(parent, rcb, clientMetadata, key, metaStrings, this.uri,
addedMetaStrings, ctx, actx, ah, maxRetries, recursionLevel, false, token,
true, returnBucket, isFinal);
+ final SingleFileFetcher f = new
SingleFileFetcher(parent, rcb, clientMetadata, key, metaStrings, this.uri,
addedMetaStrings, ctx, actx, ah, maxRetries, recursionLevel, false, token,
true, returnBucket, isFinal);
if((key instanceof ClientCHK) &&
!((ClientCHK)key).isMetadata())
rcb.onBlockSetFinished(this);
if(metadata.isCompressed()) {
@@ -427,7 +427,11 @@
f.addDecompressor(codec);
}
parent.onTransition(this, f);
- f.schedule();
+ ctx.executor.execute(new Runnable() {
+ public void run() {
+ f.schedule();
+ }
+ }, "Schedule");
// All done! No longer our problem!
return;
} else if(metadata.isSplitfile()) {