| 8 | // After that pushes it to the event loop instead of immediate call. |
| 9 | template<typename F, typename... Args> |
| 10 | void 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 |
no outgoing calls
no test coverage detected