[wesnoth-commits] [wesnoth/wesnoth] a1f44d: Implement thread-safety in the logging system

Steve Cotton noreply at github.com
Thu Oct 15 01:10:33 UTC 2020


  Branch: refs/heads/thread_safe_logging
  Home:   https://github.com/wesnoth/wesnoth
  Commit: a1f44d8f6448eda20ced1af8ec042b2f9b2f787f
      https://github.com/wesnoth/wesnoth/commit/a1f44d8f6448eda20ced1af8ec042b2f9b2f787f
  Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
  Date:   2020-10-14 (Wed, 14 Oct 2020)

  Changed paths:
    M src/deprecation.cpp
    M src/font/pango/stream_ops.hpp
    M src/formatter.hpp
    M src/game_config_manager.cpp
    M src/game_events/pump.cpp
    M src/gui/core/log.hpp
    M src/log.cpp
    M src/log.hpp
    M src/server/campaignd/addon_utils.cpp

  Log Message:
  -----------
  Implement thread-safety in the logging system

This chooses a method that minimizes the need to alter the way log messages are written.
Only a few places that did unusual things with the logger needed to be updated.


  Commit: 8b1c6cf59d260c68e2d67eb7d4aac840ef278b5c
      https://github.com/wesnoth/wesnoth/commit/8b1c6cf59d260c68e2d67eb7d4aac840ef278b5c
  Author: Steve Cotton <steve at octalot.co.uk>
  Date:   2020-10-14 (Wed, 14 Oct 2020)

  Changed paths:
    M src/gui/core/event/distributor.cpp
    M src/gui/core/event/distributor.hpp

  Log Message:
  -----------
  Another go at refactoring distributor.cpp (builds and runs successfully)

This is part-way though a refactor, but I'm not committing myself to completing
it; publishing for the comments and discussion.

This solves PR #5198's compile errors about undefined references, but the
solution here is to expand the templates into the multiple hardcoded copies
block starting with `switch(events_.sdl_button_down_event)`.


Compare: https://github.com/wesnoth/wesnoth/compare/aad330bc34bf...8b1c6cf59d26



More information about the Commits mailing list