Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ruby: Only add RepeatedField instance to cache once fully initialized
Fix: protocolbuffers#11968 Since calling a method on WeakMap allow the RubyVM to switch threads, adding a non-fully initialized object into the cache allow another thread from using it. Note: with this fix, the other two thread may create their own wrapper for the same underlying Array. We don't know if it's a big deal or not. Co-Authored-By: Peter Zhu <peter@peterzhu.ca>
- Loading branch information