Skip to content
Snippets Groups Projects
Commit 443f1e71 authored by Sergey Linev's avatar Sergey Linev
Browse files

[webgui] Let indicate that gSystem->ProcessEvents called in other thread

Using WebGui.ExternalProcessEvents: yes in rootrc.
In such mode RWebWindow ignores assigned thread id and just executes
functionality in calling thread (which is dangerous)
parent 84768305
No related branches found
No related tags found
No related merge requests found
......@@ -33,8 +33,6 @@
using namespace ROOT::Experimental;
///////////////////////////////////////////////////////////////
/// Parse boolean gEnv variable which should be "yes" or "no"
/// Returns -1 if not defined
......@@ -111,7 +109,6 @@ void RWebWindowsManager::AssignMainThrd()
gWebWinMainThrd = std::this_thread::get_id();
}
//////////////////////////////////////////////////////////////////////////////////////////
/// window manager constructor
/// Required here for correct usage of unique_ptr<THttpServer>
......@@ -383,7 +380,7 @@ std::shared_ptr<RWebWindow> RWebWindowsManager::CreateWindow()
win->RecordData(fname, prefix);
}
if (IsUseHttpThread())
if (IsUseHttpThread() || (RWebWindowWSHandler::GetBoolEnv("WebGui.ExternalProcessEvents") == 1))
win->UseServerThreads();
const char *token = gEnv->GetValue("WebGui.ConnToken", "");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment