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

Popular posts from this blog

Spring Boot + JPA + Hibernate: Unable to locate persister -

go - Golang: panic: runtime error: invalid memory address or nil pointer dereference using bufio.Scanner -

c - double free or corruption (fasttop) -