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

Method Dispatch

Modules/RESTAPI/src/mitkRenderingController.cpp:2284–2299  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2282}
2283
2284void RenderingController::Dispatch(std::function<void()> task) const
2285{
2286 StorageThreadDispatcherBase::Pointer dispatcher;
2287 {
2288 std::lock_guard<std::mutex> lock(m_DispatcherMutex);
2289 dispatcher = m_Dispatcher.Lock();
2290 }
2291 if (dispatcher.IsNull())
2292 {
2293 task();
2294 }
2295 else
2296 {
2297 dispatcher->Execute(std::move(task));
2298 }
2299}
2300
2301void RenderingController::SendErrorResponse(httplib::Response& res, int status, const nlohmann::json& error) const
2302{

Callers 4

HandlePOST_updateMethod · 0.95
HandlePOST_reinitMethod · 0.95

Calls 3

LockMethod · 0.45
IsNullMethod · 0.45
ExecuteMethod · 0.45

Tested by

no test coverage detected