PorkStudios / PorkLib

Fast, lightweight libraries for Java. Note: this is very much a work-in-progress, documentation is spotty and the API is changing constantly!
https://daporkchop.net
Other
31 stars 5 forks source link

Thread-safe (locked) collections #43

Closed DaMatrix closed 4 years ago

DaMatrix commented 4 years ago

Add some collection implementations that make use of ReadWriteLock for synchronization, allowing fast access for collections accessed frequently by multiple readers and modified only rarely.

Additionally, I plan to add some other implementations that make use of this, such as a thread-safe HashMap with weak values.

DaMatrix commented 4 years ago

weak collections can come later, this is good enough for now