Package org.gudy.azureus2.core3.util

Examples of org.gudy.azureus2.core3.util.AESemaphore.reserve()


              event.cancel();
            }
           
              // give the other end a few seconds to kick off some tunnel events to us
           
            if ( wait_sem.reserve(10000)){
             
              event.cancel();
            }
          }
                     
View Full Code Here


               
                long  elapsed = SystemTime.getMonotonousTime() - start;
               
                if ( elapsed < max ){
                 
                  sem.reserve( max - elapsed );
                 
                }else{
                 
                  break;
                }
View Full Code Here

       
        waiters.add( sem );
      }
     
      try{
        sem.reserve( 1000 );
     
      }finally{
     
        synchronized( lock ){
View Full Code Here

           
            current_request.run();
           
            while( true ){
             
              if ( sem.reserve( 1000 )){
               
                if ( error[0] != null ){
                 
                  throw( new IOException( Debug.getNestedExceptionMessage( error[0] )));
                }
View Full Code Here

     
      long  time_to_go = millis_to_wait_for_attach;
     
      while( ui_manager.getUIInstances().length == 0 ){
       
        if ( sem.reserve( 1000 )){
         
          break;
        }
       
        time_to_go -= 1000;
View Full Code Here

      Debug.printStackTrace( e );
     
      return( null );
    }
   
    sem.reserve();
   
    return( dialog[0].getSelection());
  }
 
  protected class
View Full Code Here

          {
            sem.release();
          }
        });

    sem.reserve();
   
    return(
        new DownloadScrapeResult()
        {
          public Download
View Full Code Here

               }
             }
          }
        });
         
      sem.reserve();
     
      return result[0];
     
    }catch( Throwable e ){
     
View Full Code Here

        }
      }
    }.start();
 
 
    if ( !sem.reserve( end_of_day?15*1000:0 )){
   
      String  msg = "A UPnP device is taking a long time to release its port mappings, consider disabling this via the UPnP configuration.";

      if ( upnp_log_listener != null ){
       
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.