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

Function pythonRunFromGUIThread

source/MRViewer/MRPythonAppendCommand.h:23–30  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21// with signature of `f` and returns void
22template<typename R, typename... Args>
23[[nodiscard]] auto pythonRunFromGUIThread( std::function<R( Args... )>&& f ) -> std::function<void( Args... )>
24{
25 return[fLocal = std::move( f )]( Args&&... args ) mutable
26 {
27 // fLocal must not be moved
28 pythonAppendOrRun( fLocal, std::forward<Args>( args )... );
29 };
30}
31
32template<typename F>
33[[nodiscard]] auto pythonRunFromGUIThread( F&& f )

Callers 1

MRPythonViewer.cppFile · 0.85

Calls 1

pythonAppendOrRunFunction · 0.85

Tested by

no test coverage detected