MCPcopy Create free account
hub / github.com/MITK/MITK / Dispatch

Function Dispatch

Modules/RESTAPI/src/mitkRenderWindowBridge.cpp:28–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26 */
27 template<typename Callable>
28 void Dispatch(const mitk::StorageThreadDispatcherBase::Pointer& dispatcher, Callable callable)
29 {
30 std::exception_ptr error;
31
32 auto task = [callable, &error]()
33 {
34 try
35 {
36 callable();
37 }
38 catch (...)
39 {
40 error = std::current_exception();
41 }
42 };
43
44 if (dispatcher.IsNotNull())
45 {
46 dispatcher->Execute(std::move(task));
47 }
48 else
49 {
50 task();
51 }
52
53 if (error)
54 std::rethrow_exception(error);
55 }
56}
57
58namespace mitk

Callers 15

TakeScreenshotMethod · 0.85
GetSelectedPositionMethod · 0.85
SetSelectedPositionMethod · 0.85
ListEditorsMethod · 0.85
ListStdMultiWindowsMethod · 0.85
GetStdMultiCameraMethod · 0.85
SetStdMultiCameraMethod · 0.85
ListMxNWindowsMethod · 0.85

Calls 2

IsNotNullMethod · 0.80
ExecuteMethod · 0.45

Tested by

no test coverage detected