File tree Expand file tree Collapse file tree 5 files changed +1029
-1017
lines changed Expand file tree Collapse file tree 5 files changed +1029
-1017
lines changed Original file line number Diff line number Diff line change @@ -280,10 +280,12 @@ namespace csv {
280280 return false ;
281281 else {
282282 // Reading thread is not active => start another one
283- if (this ->read_csv_worker .joinable ())
284- this ->read_csv_worker .join ();
283+ // if (this->read_csv_worker.joinable())
284+ // this->read_csv_worker.join();
285+
286+ // this->read_csv_worker = std::thread(&CSVReader::read_csv, this, internals::ITERATION_CHUNK_SIZE);
287+ this ->read_csv (internals::ITERATION_CHUNK_SIZE);
285288
286- this ->read_csv_worker = std::thread (&CSVReader::read_csv, this , internals::ITERATION_CHUNK_SIZE);
287289 }
288290 }
289291 else if (this ->records ->front ().size () != this ->n_cols &&
Original file line number Diff line number Diff line change @@ -134,9 +134,9 @@ namespace csv {
134134 CSVReader& operator =(const CSVReader&) = delete ; // No copy assignment
135135 CSVReader& operator =(CSVReader&& other) = default ;
136136 ~CSVReader () {
137- if (this ->read_csv_worker .joinable ()) {
138- this ->read_csv_worker .join ();
139- }
137+ // if (this->read_csv_worker.joinable()) {
138+ // this->read_csv_worker.join();
139+ // }
140140 }
141141
142142 /* * @name Retrieving CSV Rows */
@@ -216,13 +216,14 @@ namespace csv {
216216
217217 /* * @name Multi-Threaded File Reading: Flags and State */
218218 // /@{
219- std::thread read_csv_worker; /* *< Worker thread for read_csv() */
219+ // std::thread read_csv_worker; /**< Worker thread for read_csv() */
220220 // /@}
221221
222222 /* * Read initial chunk to get metadata */
223223 void initial_read () {
224- this ->read_csv_worker = std::thread (&CSVReader::read_csv, this , internals::ITERATION_CHUNK_SIZE);
225- this ->read_csv_worker .join ();
224+ // this->read_csv_worker = std::thread(&CSVReader::read_csv, this, internals::ITERATION_CHUNK_SIZE);
225+ // this->read_csv_worker.join();
226+ this ->read_csv (internals::ITERATION_CHUNK_SIZE);
226227 }
227228
228229 void trim_header ();
Original file line number Diff line number Diff line change @@ -8,8 +8,9 @@ namespace csv {
88 /* * Return an iterator to the first row in the reader */
99 CSV_INLINE CSVReader::iterator CSVReader::begin () {
1010 if (this ->records ->empty ()) {
11- this ->read_csv_worker = std::thread (&CSVReader::read_csv, this , internals::ITERATION_CHUNK_SIZE);
12- this ->read_csv_worker .join ();
11+ // this->read_csv_worker = std::thread(&CSVReader::read_csv, this, internals::ITERATION_CHUNK_SIZE);
12+ // this->read_csv_worker.join();
13+ this ->read_csv (internals::ITERATION_CHUNK_SIZE);
1314
1415 // Still empty => return end iterator
1516 if (this ->records ->empty ()) return this ->end ();
You can’t perform that action at this time.
0 commit comments