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

Method Open

Modules/CppMicroServices/src/usServiceHooks.cpp:66–81  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

64}
65
66void ServiceHooks::Open()
67{
68 // The tracker's Open() registers a service listener, whose registration
69 // re-enters this object through HandleServiceListenerReg -> IsOpen(). The
70 // Lock class wraps a non-recursive mutex, so holding it across the call
71 // would self-deadlock. Drive the tracker unlocked and publish the result
72 // under the lock. Callbacks observing bOpen == false while we are still
73 // driving the tracker short-circuit cleanly in HandleServiceListenerReg.
74 ServiceTracker<ServiceListenerHook>* tracker =
75 new ServiceTracker<ServiceListenerHook>(GetModuleContext(), this);
76 tracker->Open();
77
78 Lock lock(this);
79 listenerHookTracker = tracker;
80 bOpen = true;
81}
82
83void ServiceHooks::Close()
84{

Callers 5

TestFilterStringFunction · 0.45
TestServiceTrackerFunction · 0.45
LoadMethod · 0.45
LoadMethod · 0.45
InitMethod · 0.45

Calls 1

GetModuleContextFunction · 0.85

Tested by 4

TestFilterStringFunction · 0.36
TestServiceTrackerFunction · 0.36
LoadMethod · 0.36
LoadMethod · 0.36