MCPcopy Create free account
hub / github.com/MeshInspector/MeshLib / pythonAppendOrRun

Function pythonAppendOrRun

source/MRViewer/MRPythonAppendCommand.h:10–17  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8// After that pushes it to the event loop instead of immediate call.
9template<typename F, typename... Args>
10void pythonAppendOrRun( F func, Args&&... args )
11{
12 auto deferredAction = [funcLocal = std::move( func ), &...argsLocal = args]() mutable
13 {
14 funcLocal( std::forward<Args>( argsLocal )... );
15 };
16 MR::CommandLoop::runCommandFromGUIThread( std::move( deferredAction ) );
17}
18
19// Returns lambda which runs specified function `f` on commandLoop
20// deferred instead of immediate call on current thread

Callers 2

MRPythonViewer.cppFile · 0.85
pythonRunFromGUIThreadFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected