[Util] Pooled Object Reference Counter causes Race Conditions
The reference counter defined as uint32_t
in PODPool::table_type
and Pool::table_type
causes race conditions if multiple threads use the same pool, potentially triggering some of the M_insist
statements when a Pool
or Pooled
object is destroyed.
A potential solution could be to replace the uint32_t
with a std::atomic<uint32_t>
but this change is not trivial.
This problem persists in !369 as far as I can tell.