We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 45d4e9e commit 6ded7c3Copy full SHA for 6ded7c3
1 file changed
unittests/CppInterOp/Utils.cpp
@@ -35,12 +35,8 @@ struct DispatchInitializer {
35
DispatchInitializer(DispatchInitializer&&) noexcept = default;
36
DispatchInitializer& operator=(DispatchInitializer&&) noexcept = default;
37
};
38
-// Thread-safe initialization using function-local static
39
-DispatchInitializer& GetDispatchInitializer() {
40
- static DispatchInitializer instance;
41
- return instance;
42
-}
43
-const DispatchInitializer& g_dispatch_init = GetDispatchInitializer();
+// FIXME: Make this threadsafe by moving it as a function static.
+DispatchInitializer g_dispatch_init;
44
} // namespace
45
#endif
46
0 commit comments