File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ typedef unsigned char uint8;
2727static const int PACK_NUM_LIMIT = 1000000 ;
2828
2929// how many reads one pack has
30- static const int PACK_SIZE = 1000 ;
30+ static const int PACK_SIZE = 10000 ;
3131
3232// if one pack is produced, but not consumed, it will be kept in the memory
3333// this number limit the number of in memory packs
Original file line number Diff line number Diff line change 11#include " threadconfig.h"
22#include " util.h"
33#include < memory.h>
4+ #include < unistd.h>
45
56ThreadConfig::ThreadConfig (Options* opt, int threadId){
67 mOptions = opt;
@@ -42,6 +43,9 @@ bool ThreadConfig::setInputCompleted() {
4243}
4344
4445void ThreadConfig::output (){
46+ if (mOutputCounter >= mInputCounter ) {
47+ usleep (100 );
48+ }
4549 while ( mOutputCounter < mInputCounter )
4650 {
4751 long target = mOutputCounter % PACK_NUM_LIMIT;
You can’t perform that action at this time.
0 commit comments