Guys, can anyone give a simple practical example of LockSupport
& AbstractQueuedSynchronizer
use? Example given in javadocs is quite strained.<
AQS is a wonderful class for building concurrency primitives – but it is complex and requires a bit of study to use it properly. I have used it for a few things like lazy initialisation and a simple fast reusable latch.
As complex as it is, I don't think AQS is particularly vague, it has excellent javadocs describing how to use it properly.