Open Joannis opened 4 months ago
The lock is necessary for the index which is built lazily upon access. It’s possible that multiple immutable fields instances share the same storage without an index, and multiple threads call methods that need the index in parallel.
Since it's handled as CoW through
isKnownUniquelyReferenced
, I would not expect to need a lock.