[Tile-serving] [openstreetmap/osm2pgsql] New thread pool implementation (#1486)

Jochen Topf notifications at github.com
Tue May 11 09:51:04 UTC 2021


Change the thread pool implementation giving us several new features:
* Threads are now numbered and when debug logging is used, the thread
  number is reported in each log line.
* Each task running in the thread pool is timed. This allows for
  better logging where our time is spent.
* When submitting a task we now return a future that can be used
  to access the running time of the thread. The code in the main
  thread can also wait for this future to make sure the background
  task is done.

This switches the minimum C++ version needed from 11 to 14 because we
need lambda capture by move.
You can view, comment on, or merge this pull request online at:

  https://github.com/openstreetmap/osm2pgsql/pull/1486

-- Commit Summary --

  * New thread pool implementation

-- File Changes --

    M .github/workflows/ci.yml (4)
    M CMakeLists.txt (4)
    M README.md (3)
    M src/CMakeLists.txt (1)
    M src/flex-table.cpp (12)
    M src/flex-table.hpp (10)
    M src/logging.cpp (2)
    M src/logging.hpp (6)
    M src/middle-pgsql.cpp (20)
    M src/middle-pgsql.hpp (10)
    M src/middle.hpp (2)
    M src/options.cpp (2)
    M src/options.hpp (2)
    M src/osmdata.cpp (8)
    M src/output-flex.cpp (11)
    M src/output-flex.hpp (2)
    M src/output-pgsql.cpp (12)
    M src/output-pgsql.hpp (2)
    M src/output.hpp (2)
    M src/table.cpp (12)
    M src/table.hpp (10)
    A src/thread-pool.cpp (64)
    M src/thread-pool.hpp (153)
    M src/util.cpp (6)
    M src/util.hpp (3)
    M tests/common-import.hpp (3)

-- Patch Links --

https://github.com/openstreetmap/osm2pgsql/pull/1486.patch
https://github.com/openstreetmap/osm2pgsql/pull/1486.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/pull/1486
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20210511/163e44b6/attachment-0001.htm>


More information about the Tile-serving mailing list