2 ms·
sync-like classes [1] have been used for a long time in C++. I'm pretty sure that Stroustrup had one in his book. Of course it is always easy to subvert this ki
by gpderetta 5y ago
sync-like classes [1] have been used for a long time in C++. I'm pretty sure that Stroustrup had one in his book. Of course it is always easy to subvert this kind of protection in C++ as you can easily leak references outside of the implicit critical section.
[1] https://gcc.godbolt.org/z/3Wefz3cjK https://gcc.godbolt.org/z/3Wefz3cjK