Commit fc6a2e9e authored by Joseph Noir's avatar Joseph Noir

Fix rebase error

parent 748551da
...@@ -94,7 +94,7 @@ class singletons { ...@@ -94,7 +94,7 @@ class singletons {
static T* lazy_get(std::atomic<T*>& ptr, mutex& mtx, Factory f) { static T* lazy_get(std::atomic<T*>& ptr, mutex& mtx, Factory f) {
auto result = ptr.load(std::memory_order_acquire); auto result = ptr.load(std::memory_order_acquire);
if (result == nullptr) { if (result == nullptr) {
lock_guard<mutex> guard(get_plugin_mutex()); lock_guard<mutex> guard(mtx);
result = ptr.load(std::memory_order_relaxed); result = ptr.load(std::memory_order_relaxed);
if (result == nullptr) { if (result == nullptr) {
result = f(); result = f();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment