Open Mrockwell2 opened 1 year ago
Thanks for pulling this up here Marcus! We should consider what we want the synch model for the MemoryManger to be. It's a bit ad-hoc in the current Trick, and I think we need to think about it a little harder. We definitely need some synch, since in Trick the memory manager is often accessed via variable server session or data recording threads, so we should work backwards from that and figure out some requirements.
Also - I want to stop using pthreads directly and use the C++ threading library, which gives us things like RAII style locking.
Just read up on RAII and it looks interesting! If we upgrade to C++ threads, would we also need to upgrade the rest of Trick? I'm pretty sure we'll get some pushback on the change if that's the case.
Yeah probably, but it should be contained to Trick internals so hopefully it wouldn't cause issues with our customers.
Yeah you're probably right
https://github.com/jdeans289/icg2/blob/aad7ec8e8f7f9bf1c8214a8f56a8bf46add223de/DataTypes/src/MemoryManagement/MemoryManager.cpp#L191-L192
TODO comment turned to issue