logo       

AW: more lock modes based on AbstractQueuedSynchronizer: msg#00001

java.jsr.166-concurrency

Subject: AW: more lock modes based on AbstractQueuedSynchronizer

As far as I understand:

* "shared" only means "potentially shared", i.e. two threads possibly
operating concurrently "in" the lock. The exclusive mode is more
performant since the AQS "knows better" how many waiting threads to wake
up
* the lock state must be encodable in an int
* a lock request must be encodable in an int (why is this? Well, it
can't be more information as is encodable in the state ...)

So it seems well possible to do what you're thinking about.
AQS is very powerful indeed ...

Matthias


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise