else { long tmp=decrementCredit(sent, dest, length); if(tmp != -1) lowest_credit=Math.min(tmp, lowest_credit);
finally { Util.release(lock);
    private void handleDownMessage(Event evt) {        Message msg=(Message)evt.getArg();        int     length=msg.getLength();        Address dest=msg.getDest();        synchronized(mutex) {            if(lowest_credit <= length) {                determineCreditors(dest, length);                insufficient_credit=true;                num_blockings++;                start_blocking=System.currentTimeMillis();                while(insufficient_credit && running) {                    try {mutex.wait(max_block_time);} catch(InterruptedException e) {}                    if(insufficient_credit && running) {                        if(trace)                            log.trace("timeout occurred waiting for credits; sending credit request to " + creditors);                        for(int i=0; i < creditors.size(); i++) {                            sendCreditRequest((Address)creditors.get(i));                        }                    }                }                stop_blocking=System.currentTimeMillis();                long block_time=stop_blocking - start_blocking;                if(trace)                    log.trace("total time blocked: " + block_time + " ms");                total_time_blocking+=block_time;                last_blockings.add(new Long(block_time));            }            else {                long tmp=decrementCredit(sent, dest, length);                if(tmp != -1)                    lowest_credit=Math.min(tmp, lowest_credit);            }        }        // send message - either after regular processing, or after blocking (when enough credits available again)        passDown(evt);    }