CVS update: JGroups/src/org/jgroups/util CreditMap.java

"Bela Ban" <[email protected]>
Newsgroups gmane.comp.java.javagroups.cvs
Message-ID <[email protected]>
  User: belaban 
  Date: 10/09/08 10:51:22

  Modified:    src/org/jgroups/util CreditMap.java
  Log:
  ns
  
  Revision  Changes    Path
  1.7       +4 -1      JGroups/src/org/jgroups/util/CreditMap.java
  
  Index: CreditMap.java
  ===================================================================
  RCS file: /cvsroot/javagroups/JGroups/src/org/jgroups/util/CreditMap.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- CreditMap.java	7 Sep 2010 15:39:33 -0000	1.6
  +++ CreditMap.java	8 Sep 2010 10:51:22 -0000	1.7
  @@ -12,7 +12,7 @@
   /**
    * Maintains credits for senders, when credits fall below 0, a sender blocks until new credits have been received.
    * @author Bela Ban
  - * @version $Id: CreditMap.java,v 1.6 2010/09/07 15:39:33 belaban Exp $
  + * @version $Id: CreditMap.java,v 1.7 2010/09/08 10:51:22 belaban Exp $
    */
   public class CreditMap {
       protected final long              max_credits;
  @@ -112,6 +112,9 @@
               if(decrement(credits))
                   return true;
   
  +            if(timeout <= 0)
  +                return false;
  +            
               try {
                   credits_available.await(timeout, TimeUnit.MILLISECONDS);
                   if(decrement(credits))
  
  
  

------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.