Conversation
|
If you're interested I can also push our other changes, namely However these changes were only made to files we actually use (nothing SOA*), so it would leave the code base inconsistent. |
Thanks for the offer. But as you already pointed out it will not keep it simple here. |
| return NULL; | ||
| } | ||
|
|
||
| SOCmnSingleLock<SOCmnSync> lock(&g_engineSync); |
There was a problem hiding this comment.
@mkentie Why must this lock be acquired here ? The only other place where it is used is in "SODaSEntry* getSODaSEntry(void) (line 122)" to guard the global g_engine.
|
When multiple threads simultaneously would try to write items, the lazy initialization of the namespace root would happen multiple times, resulting in a memory leak. However it could be that I just
re-used this lock, instead of adding a new lock member, because it was easy and wouldn't lead to issues. A seperate g_namespaceSync would have been more appropriate.
… @mrsuciu commented on this pull request.
> @@ -674,6 +674,8 @@ SODaSNameSpaceRoot* SODaSEntry::getNameSpaceRoot(
return NULL;
}
+ SOCmnSingleLock<SOCmnSync> lock(&g_engineSync);
@mkentie Why must this lock be acquired here ? The only other place where it is used is in "SODaSEntry* getSODaSEntry(void) (line 122)" to guard the global g_engine.
--
Reply to this email directly or view it on GitHub:
#7 (review)
You are receiving this because you were mentioned.
Message ID: ***@***.***>
|
|
@mkentie Good stuff. Can you please add the g_namespaceSync you mentioned, to keep the code cleaner? |
-Wrong type of container in SOCmnList.cpp
-CoUninitialize not being called if initialized as COINIT_MULTITHREADED in SoCltEntry.
-Leaking of NameSpaceRoots during multi-threaded variable updates in SODaSEntry.cpp.