Ballmerpeak devblog

Software development, related stuff and others

Threads: Why you should hate and love them 2: LazyHashLock

July 26, 2015 — Richárd Thier

Java has many interesting built-in and library tools for locking, synchronization and parallel/concurrent programming in general, but you can always find situations when the built in toolset is not enough or more often: not convenient enough. In most situations, the problem can be solved in some usual way, but you feel it is not the best way to do that and I think some of us create a generic solution in those times. This is how design patterns, practices and libraries appear and because I have found an interesting kind of lock that can be handy in many situations I have decided to share some of my code: enjoy my little solution that I call "LazyHashLock".

Read more...

Tags: java, lazy, hash, lock, concurrency, LazyHashLock, parallel, thread, synchronization, case study, striping, splitting, pool, shared