to Concurrent Container
fun MutablePersistentDataContainer.toConcurrentContainer(): ConcurrentPersistentDataContainer(source)
Converts the current MutablePersistentDataContainer to a thread-safe implementation by wrapping it in a ConcurrentPersistentDataContainer.
The returned ConcurrentPersistentDataContainer ensures thread safety by synchronizing access to the underlying container through a java.util.concurrent.locks.ReentrantReadWriteLock. This allows concurrent reads and controlled writes to maintain data consistency and prevent race conditions.
Return
A thread-safe ConcurrentPersistentDataContainer wrapping the current container.
Author
Fantamomo
Since
4.0-SNAPSHOT