MCPcopy Create free account
hub / github.com/PDAL/PDAL / read

Method read

io/EsriReader.cpp:394–423  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

392
393
394point_count_t EsriReader::read(PointViewPtr view, point_count_t count)
395{
396 point_count_t numRead = 0;
397
398 if (m_tilesToProcess == 0)
399 return 0;
400
401 do
402 {
403 std::unique_lock<std::mutex> l(m_mutex);
404 if (m_contents.size())
405 {
406 TileContents tile = std::move(m_contents.front());
407 m_contents.pop();
408 l.unlock();
409 checkTile(tile);
410 process(view, tile, count - numRead);
411 numRead += tile.size();
412 m_tilesToProcess--;
413 }
414 else
415 m_contentsCv.wait(l);
416 } while (m_tilesToProcess && numRead < count);
417
418 // Wait for any running threads to finish and don't start any others.
419 // Only relevant if we hit the count limit before reading all the tiles.
420 m_pool->stop();
421
422 return numRead;
423}
424
425bool EsriReader::processOne(PointRef& point)
426{

Callers

nothing calls this directly

Calls 4

processFunction · 0.85
unlockMethod · 0.80
waitMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected