Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion include/class_loader/class_loader.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#define CLASS_LOADER__CLASS_LOADER_HPP_

#include <algorithm>
#include <atomic>
#include <cassert>
#include <cstddef>
#include <functional>
Expand Down Expand Up @@ -379,7 +380,7 @@ class ClassLoader
std::recursive_mutex load_ref_count_mutex_;
int plugin_ref_count_;
std::recursive_mutex plugin_ref_count_mutex_;
static bool has_unmanaged_instance_been_created_;
static std::atomic<bool> has_unmanaged_instance_been_created_;
};

} // namespace class_loader
Expand Down
2 changes: 1 addition & 1 deletion src/class_loader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
namespace class_loader
{

bool ClassLoader::has_unmanaged_instance_been_created_ = false;
std::atomic<bool> ClassLoader::has_unmanaged_instance_been_created_{false};

bool ClassLoader::hasUnmanagedInstanceBeenCreated()
{
Expand Down
Loading