[freenet-dev] [freenet-cvs] r12293 - in trunk/freenet/src/freenet/client: . async

Florent Daignière (NextGen$) nextgens at freenetproject.org
Sat Mar 24 01:37:21 UTC 2007


* Matthew Toseland <toad at amphibian.dyndns.org> [2007-03-24 01:34:44]:

> On Sat, Mar 24, 2007 at 12:53:03AM +0000, nextgens at freenetproject.org wrote:
> > Author: nextgens
> > Date: 2007-03-24 00:53:02 +0000 (Sat, 24 Mar 2007)
> > New Revision: 12293
> > 
> > Modified:
> >    trunk/freenet/src/freenet/client/StandardOnionFECCodec.java
> >    trunk/freenet/src/freenet/client/async/SplitFileInserterSegment.java
> > Log:
> > More work on #403
> > 
> > Experimental code: might eat your cat, break your downloads/inserts and so on.
> > 
> > Modified: trunk/freenet/src/freenet/client/StandardOnionFECCodec.java
> > ===================================================================
> > --- trunk/freenet/src/freenet/client/StandardOnionFECCodec.java	2007-03-23 22:56:49 UTC (rev 12292)
> > +++ trunk/freenet/src/freenet/client/StandardOnionFECCodec.java	2007-03-24 00:53:02 UTC (rev 12293)
> > @@ -6,6 +6,7 @@
> >  import java.io.DataInputStream;
> >  import java.io.IOException;
> >  import java.io.OutputStream;
> > +import java.util.LinkedList;
> >  
> >  import com.onionnetworks.fec.FECCode;
> >  import com.onionnetworks.fec.Native8Code;
> > @@ -120,6 +121,9 @@
> >  		// fec = new PureCode(k,n);
> >  		// Crashes are caused by bugs which cause to use 320/128 etc. - n > 256, k < 256.
> >  
> > +		fecRunnerThread = new Thread(fecRunner, "FEC Pool");
> > +		fecRunnerThread.setDaemon(true);
> > +		fecRunnerThread.setPriority(Thread.MIN_PRIORITY);
> >  		logMINOR = Logger.shouldLog(Logger.MINOR, this);
> >  	}
> >  
> > @@ -472,4 +476,81 @@
> >  	public int countCheckBlocks() {
> >  		return n-k;
> >  	}
> > +	
> > +	// ###############################
> > +	
> > +	public void addToQueue(Bucket[] dataBlocks, Bucket[] checkBlocks, int blockLength, BucketFactory bucketFactory, StandardOnionFECCodecEncoderCallback callback){
> > +		if(!fecRunner.getIsStarted()) fecRunner.run();
> 
> This I don't get. Don't you want to start a thread here?

Fixed in r12297 :)
Thanks for spotting it.

NextGen$



More information about the Devl mailing list