28 Jul
2008
28 Jul
'08
10:43 p.m.
Thanks, guys. I change my code a bit. The results are right. But I suspect
it never used thread, but excute the thread one by one.
new code
void mtread(char* filename,const int stidx, const int edidx,int id) {
fstream infile;
infile.open(filename);
string line;
int linenum = 0;
if (infile.good()){
while (! infile.eof()) {
boost::mutex::scoped_lock lock(io_mutex);
// infile.seekg(linenum,ios::beg);
getline(infile,line);
if (linenum>=stidx && linenum<=edidx){
cout<
5954
Age (days ago)
5954
Last active (days ago)
0 comments
1 participants
participants (1)
-
Gang Ma