We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 78a2cce commit 7f700fbCopy full SHA for 7f700fb
1 file changed
framework/global/thirdparty/kors_modularity/modularity/ioc.h
@@ -138,6 +138,12 @@ class ThreadSafeInjectBase : public InjectBase<I>
138
public:
139
using InjectBase<I>::InjectBase;
140
141
+ ~ThreadSafeInjectBase()
142
+ {
143
+ std::shared_lock lock(m_mutex);
144
+ InjectBase<I>::m_subscriber.unsubscribe();
145
+ }
146
+
147
const std::shared_ptr<I>& get() const
148
{
149
@@ -164,7 +170,7 @@ class ThreadSafeInjectBase : public InjectBase<I>
164
170
}
165
171
166
172
private:
167
- mutable std::shared_mutex m_mutex;
173
+ static inline std::shared_mutex m_mutex;
168
174
};
169
175
176
//! NOTE Global Inject
0 commit comments