// Path: uk/ac/bbsrc/babraham/FastQC/Modules/QCModule.java
// public interface QCModule {
// 
// 	public void processSequence(Sequence sequence);
// 
// 	public JPanel getResultsPanel();
// 	
// 	public String name ();
// 	
// 	public String description ();
// 	
// 	public void reset ();
// 	
// 	public boolean raisesError();
// 	
// 	public boolean raisesWarning();
// 	
// 	public boolean ignoreFilteredSequences();
// 
// 	public void makeReport(HTMLReportArchive report) throws IOException;
// 	
// 	
// }
// 
// Path: uk/ac/bbsrc/babraham/FastQC/Sequence/SequenceFile.java
// public interface SequenceFile {
// 
// 	public boolean hasNext();
// 	public Sequence next() throws SequenceFormatException;
// 	public boolean isColorspace();
// 	public String name();
// 	public int getPercentComplete();
// 	public File getFile();
// 	
// }


import uk.ac.bbsrc.babraham.FastQC.Sequence.SequenceFile;
import java.util.LinkedList;
import uk.ac.bbsrc.babraham.FastQC.Modules.QCModule;
			
		}
		
		Thread t = new Thread(this);
		t.start();
	}
	
	public void addToQueue (AnalysisRunner runner) {
		queue.add(runner);
	}

	public void run() {

		while (true) {
//			System.err.println("Status available="+availableSlots+" used="+usedSlots+" queue="+queue.size());
			if (availableSlots > usedSlots && queue.size() > 0) {
				++usedSlots;
				AnalysisRunner currentRun = queue.getFirst();
				queue.removeFirst();
				currentRun.addAnalysisListener(this);
				Thread t = new Thread(currentRun);
				t.start();
			}
			
			try {
				Thread.sleep(500);
			} catch (InterruptedException e) {}
		}
	}

// Path: uk/ac/bbsrc/babraham/FastQC/Modules/QCModule.java
// public interface QCModule {
// 
// 	public void processSequence(Sequence sequence);
// 
// 	public JPanel getResultsPanel();
// 	
// 	public String name ();
// 	
// 	public String description ();
// 	
// 	public void reset ();
// 	
// 	public boolean raisesError();
// 	
// 	public boolean raisesWarning();
// 	
// 	public boolean ignoreFilteredSequences();
// 
// 	public void makeReport(HTMLReportArchive report) throws IOException;
// 	
// 	
// }
// 
// Path: uk/ac/bbsrc/babraham/FastQC/Sequence/SequenceFile.java
// public interface SequenceFile {
// 
// 	public boolean hasNext();
// 	public Sequence next() throws SequenceFormatException;
// 	public boolean isColorspace();
// 	public String name();
// 	public int getPercentComplete();
// 	public File getFile();
// 	
// }


// Path: uk/ac/bbsrc/babraham/FastQC/Analysis/AnalysisQueue.java
import uk.ac.bbsrc.babraham.FastQC.Sequence.SequenceFile;
import java.util.LinkedList;
import uk.ac.bbsrc.babraham.FastQC.Modules.QCModule;

			
		}
		
		Thread t = new Thread(this);
		t.start();
	}
	
	public void addToQueue (AnalysisRunner runner) {
		queue.add(runner);
	}

	public void run() {

		while (true) {
//			System.err.println("Status available="+availableSlots+" used="+usedSlots+" queue="+queue.size());
			if (availableSlots > usedSlots && queue.size() > 0) {
				++usedSlots;
				AnalysisRunner currentRun = queue.getFirst();
				queue.removeFirst();
				currentRun.addAnalysisListener(this);
				Thread t = new Thread(currentRun);
				t.start();
			}
			
			try {
				Thread.sleep(500);
			} catch (InterruptedException e) {}
		}
	}

	public void analysisComplete(SequenceFile file, QCModule[] results) {