@ GuardedBy ( "lock" ) private void beginWaitingFor ( Guard guard ) { int waiters = guard . waiterCount ++ ; if ( waiters == 0 ) { // push guard onto activeGuards guard . next = activeGuards ; activeGuards = guard ; } }
Records that the current thread is about to wait on the specified guard .