public void endRead ( ) { SynchronizationPoint < NoException > sp ; synchronized ( this ) { // if others are still reading, nothing to do if ( -- readers > 0 ) return ; // if nobody is waiting to write, nothing to do if ( writersWaiting == null ) return ; sp = writersWaiting . removeFirst ( ) ; if ( writersWaiting . isEmpty ( ) ) writersWaiting = null ; writer = true ; } sp . unblock ( ) ; }
To call when the thread leaves the read mode and release this lock point .