FileDocCategorySizeDatePackage
SelfLoopHandler.javaAPI DocExample554Thu Mar 11 19:51:02 GMT 2004javathreads.examples.ch15

SelfLoopHandler

public class SelfLoopHandler extends PoolLoopHandler

Fields Summary
protected int
groupSize
Constructors Summary
public SelfLoopHandler(int start, int end, int size, int threads)

        super(start, end, threads);
        groupSize = size;
    
Methods Summary
protected synchronized LoopRangeloopGetRange()

        if (curLoop >= endLoop)
            return null;
        LoopRange ret = new LoopRange();
        ret.start = curLoop;
        curLoop += groupSize;
        ret.end = (curLoop<endLoop)?curLoop:endLoop;
        return ret;