private boolean exitFlag;
private ArrayList<Thread> threadList = new ArrayList<Thread>();
public QuickInputChunk getNext(int threadID){
synchronized (syncObject){
QuickInputChunk chunk = null;
while (chunk == null) {
for (Iterator<QuickInputChunk> it = chunkList.iterator(); it.hasNext();) {
QuickInputChunk cur = it.next();
if ((cur.nSyst % THREADS_COUNT) == threadID) {
chunk = cur;
it.remove();
break;
}