Package org.gudy.azureus2.core3.util

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


                  {
                    boolean  last_preview_mode = preview_mode;
                   
                    while( !sem.isReleasedForever() && !cancelled ){
                     
                      if ( !sem.reserve( 250 )){
                     
                        if ( cancelled ){
                         
                          return;
                        }
View Full Code Here


                      }
                    }
                  }
                }.start();
               
              sem.reserve();
             
              synchronized( StreamManager.this ){
               
                if ( cancelled ){
                   
View Full Code Here

                  sem.release();
                }
              }
            });
       
        sem.reserve();
       
        synchronized( StreamManager.this ){
         
          if ( cancelled ){
             
View Full Code Here

                }
              }
            },
            contact.getProtocolVersion() >= DHTTransportUDP.PROTOCOL_VERSION_ANTI_SPOOF2?new byte[0]:new byte[20] );
       
        sem.reserve();
      }
     
      try{
        this_mon.enter();
       
View Full Code Here

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

     
        downloader.download();
       
      }else{
       
        sem.reserve();
      }
    }finally{
     
      boolean  was_auto;
     
View Full Code Here

        try{
          addListener( dm_listener );
       
          upnp_manager.search();
         
          sem.reserve( millis );
         
        }finally{
         
          synchronized( DeviceManagerImpl.this ){
           
View Full Code Here

      error[0= new NetworkAdminException( "Connect failed", e );
     
      sem.release();
    }
   
    if ( !sem.reserve(10000)){
     
      result[0]   = RES_CONNECT_FAILED;
      error[0]   = new NetworkAdminException( "Connect timeout" );
    }
   
View Full Code Here

            sem.release();
          }
        }
      });
   
    sem.reserve();
   
    if ( result[0] instanceof PlatformMessengerException ){
     
      throw((PlatformMessengerException)result[0]);
    }
View Full Code Here

            sem.release();
          }
        }
      });
   
    if ( !sem.reserve( 10000 )){
     
      Debug.out( "operation didn't complete in time" );
    }
  }
 
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.