]> git.donarmstrong.com Git - mothur.git/blobdiff - screenseqscommand.h
added checks to make sure windows processes completed their tasks.
[mothur.git] / screenseqscommand.h
index 284c9a5ac1a0bd5c90dca6b4854b725d6b428023..6f4e8aca688cd3342c13400aff588f4f3eaec24a 100644 (file)
@@ -149,9 +149,11 @@ static DWORD WINAPI MySumThreadFunction(LPVOID lpParam){
                        in.seekg(pDataArray->start-1); pDataArray->m->gobble(in); 
                }
                
-               pDataArray->count = pDataArray->end;
+               
                for(int i = 0; i < pDataArray->end; i++){ //end is the number of sequences to process
                        
+            pDataArray->count++;
+            
                        if (pDataArray->m->control_pressed) { in.close();  pDataArray->count = 1; return 1; }
                        
                        Sequence current(in); pDataArray->m->gobble(in); 
@@ -213,9 +215,10 @@ static DWORD WINAPI MySumScreenThreadFunction(LPVOID lpParam){
                        in.seekg(pDataArray->start-1); pDataArray->m->gobble(in); 
                }
                
-               pDataArray->count = pDataArray->end;
                for(int i = 0; i < pDataArray->end; i++){ //end is the number of sequences to process
                        
+            pDataArray->count++;
+            
                        if (pDataArray->m->control_pressed) { in.close(); badAccnosFile.close(); goodFile.close(); pDataArray->count = 1; return 1; }
                        
                        Sequence currSeq(in); pDataArray->m->gobble(in);