[Tile-serving] [openstreetmap/osm2pgsql] Fix: Fix threading issue in logger (PR #1986)
Jochen Topf
notifications at github.com
Wed Jun 28 17:49:08 UTC 2023
The (singleton) logger can be called from multiple threads at once, but it writes the m_needs_leading_return member variable. This commit turns that variable into an atomic to fix this.
This also moves some logic out of the generate_common_prefix() function so that we can make it const. This makes it easier to see that the code is now thread-safe.
You can view, comment on, or merge this pull request online at:
https://github.com/openstreetmap/osm2pgsql/pull/1986
-- Commit Summary --
* Fix: Fix threading issue in logger
-- File Changes --
M src/logging.cpp (19)
M src/logging.hpp (16)
-- Patch Links --
https://github.com/openstreetmap/osm2pgsql/pull/1986.patch
https://github.com/openstreetmap/osm2pgsql/pull/1986.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/pull/1986
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/osm2pgsql/pull/1986 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20230628/020640c7/attachment-0001.htm>
More information about the Tile-serving
mailing list