Does Java 8 provide Locking Priority? -
i have 1 writer object , multiple reader objects. read/write single object "stateobject"
reader:
readlock read stateobject readunlock
writer:
writelock update stateobject writelock
assume 5 outof 10 readers holding readlock:
at time t1, writer issues writelock request @ time t2 > t1, 3 readers issue readlock request
now requirement since writer has asked writelock, other 3 read threads should not readlock , after first 5 threads done readlock, writer should lock
is there java8 locking mechanism suppports ?
Comments
Post a Comment