public synchronized void post ( ) { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "post" , "" + count ) ; -- count ; if ( count >= 0 ) notify ( ) ; if ( tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "post" ) ; }
Post the semaphore waking up at most one waiter . If there are no waiters then the next thread issuing a waitOn call will not be suspended . In fact if post is invoked n times then the next n waitOn calls will not block .