[wesnoth-commits] [wesnoth/wesnoth] b780da: add locks around gettext calls
GitHub
noreply at github.com
Sat Feb 24 21:39:48 UTC 2018
Branch: refs/heads/master
Home: https://github.com/wesnoth/wesnoth
Commit: b780da48e70e1139075890256bb089e40368b363
https://github.com/wesnoth/wesnoth/commit/b780da48e70e1139075890256bb089e40368b363
Author: gfgtdf <daniel.gfgtdf at gmail.com>
Date: 2018-02-24 (Sat, 24 Feb 2018)
Changed paths:
M src/gettext_boost.cpp
Log Message:
-----------
add locks around gettext calls
This should fix #2013. I am unsure whether this seriously infulences the performance since mutexes are somehow slow, If this implacts the performance we could also change it in a way that the mutex is only used when we have actually 2 active theads (the loadingscreen) (replace `std::lock_guard<std::mutex> lock(get_mutex());` with something like
`std::unique_ptr<std::lock_guard<std::mutex>> lock(is_in_locaingscreen? new std::lock_guard<std::mutex>(get_mutex()) : nullptr))`
More information about the Commits
mailing list