MCPcopy Create free account
hub / github.com/CasparCG/server / begin_invoke

Function begin_invoke

src/modules/html/html.cpp:313–327  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

311void invoke(const std::function<void()>& func) { begin_invoke(func).get(); }
312
313std::future<void> begin_invoke(const std::function<void()>& func)
314{
315 CefRefPtr<cef_task> task = new cef_task(func);
316
317 if (CefCurrentlyOn(TID_UI)) {
318 // Avoid deadlock.
319 task->Execute();
320 return task->future();
321 }
322
323 if (CefPostTask(TID_UI, task.get())) {
324 return task->future();
325 }
326 CASPAR_THROW_EXCEPTION(caspar_exception() << msg_info("[cef_executor] Could not post task"));
327}
328
329} // namespace caspar::html

Callers 4

invokeFunction · 0.85
reloadMethod · 0.85
do_execute_javascriptMethod · 0.85
invokeMethod · 0.85

Calls 5

caspar_exceptionClass · 0.85
msg_infoFunction · 0.85
futureMethod · 0.80
ExecuteMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected