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? -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: Digital signature URL: <https://emu.freenetproject.org/pipermail/devl/attachments/20070324/d0c12cc9/attachment.pgp>