[Node] Fix sync nodes lag
This commit is contained in:
parent
991056b362
commit
eb71cf0ae8
@ -872,7 +872,17 @@ namespace Components
|
|||||||
{
|
{
|
||||||
Logger::Print("Resynchronizing nodes...\n");
|
Logger::Print("Resynchronizing nodes...\n");
|
||||||
|
|
||||||
Node::LoadNodeRemotePreset();
|
static bool threadRunning = false;
|
||||||
|
|
||||||
|
if (!threadRunning)
|
||||||
|
{
|
||||||
|
threadRunning = true;
|
||||||
|
std::thread([]()
|
||||||
|
{
|
||||||
|
Node::LoadNodeRemotePreset();
|
||||||
|
threadRunning = false;
|
||||||
|
}).detach();
|
||||||
|
}
|
||||||
|
|
||||||
std::lock_guard<std::recursive_mutex> _(Node::NodeMutex);
|
std::lock_guard<std::recursive_mutex> _(Node::NodeMutex);
|
||||||
for (auto& node : Node::Nodes)
|
for (auto& node : Node::Nodes)
|
||||||
|
Loading…
Reference in New Issue
Block a user