MCPcopy Create free account
hub / github.com/FreeCAD/FreeCAD / requireMainThread

Function requireMainThread

src/Gui/Application.cpp:177–187  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

175{
176
177void requireMainThread(const char* api)
178{
179 if (App::MainThreadSignalConfig::isMainThread()) {
180 return;
181 }
182
183 Base::Console().error("GUI API '%s' may only be used from the main thread.\n", api);
184 throw Base::RuntimeError(
185 std::string("GUI API '") + api + "' may only be used from the main thread"
186 );
187}
188
189class ViewProviderMap
190{

Callers 5

requirePythonMainThreadFunction · 0.85
getPyObjectMethod · 0.85
showViewProviderMethod · 0.85
hideViewProviderMethod · 0.85
getViewProviderMethod · 0.85

Calls 1

errorMethod · 0.45

Tested by

no test coverage detected