Examples of AEThread2


Examples of org.gudy.azureus2.core3.util.AEThread2

          initializationComplete()
          {
              // startup can take a while as adding the upnp listener can sync call back device added and result
              // in device details loading etc
           
            new AEThread2( "DMUPnPAsyncStart", true )
            {
              public void
              run()
              {
                startUp();
View Full Code Here

Examples of org.gudy.azureus2.core3.util.AEThread2

 
  protected
  UDPSelector(
    final UDPConnectionManager    manager )
  {
    new AEThread2( "UDPSelector", true )
    {
      public void
      run()
      {
        boolean  quit    = false;
View Full Code Here

Examples of org.gudy.azureus2.core3.util.AEThread2

  }
 
  protected void
  cancelTest()
  {
    new AEThread2( "NetStatus:cancel", true )
      {
        public void
        run()
        {
          cancelTestSupport();
View Full Code Here

Examples of org.gudy.azureus2.core3.util.AEThread2

      copy_outstanding_set = true;
     
      if ( copy_thread == null ){
       
        copy_thread =
          new AEThread2( "Device:copier", true )
          {
            public void
            run()
            {
              performCopy();
View Full Code Here

Examples of org.gudy.azureus2.core3.util.AEThread2

        }
      });
   
       //start read selector processing
   
    AEThread2 read_selector_thread =
        new AEThread2( "ReadController:ReadSelector", true )
        {
          public void
          run()
          {
            while( true ) {
         
              try{
                if ( READ_SELECT_MIN_LOOP_TIME > 0 ){
                 
                  long  start = SystemTime.getHighPrecisionCounter();
                 
                  read_selector.select( READ_SELECT_LOOP_TIME );
                 
                  long duration = SystemTime.getHighPrecisionCounter() - start;
                 
                  duration = duration/1000000;
                 
                  long  sleep = READ_SELECT_MIN_LOOP_TIME - duration;
                 
                  if ( sleep > 0 ){
                                       
                    try{                
                      Thread.sleep( sleep );
                     
                    }catch( Throwable e ){   
                    }
                  }
                }else{
                 
                  read_selector.select( READ_SELECT_LOOP_TIME );
                }
               
                read_select_count++;
                 
              }catch( Throwable t ) {
               
                Debug.out( "readSelectorLoop() EXCEPTION: ", t );
              }     
            }
          }
        };
       
      read_selector_thread.setPriority( Thread.MAX_PRIORITY - 2 );
      read_selector_thread.start();
     
        //start write selector processing
     
      AEThread2 write_selector_thread =
        new AEThread2( "WriteController:WriteSelector", true )
        {
          public void
          run()
          {
              while( true ){
               
                try{
                  if ( WRITE_SELECT_MIN_LOOP_TIME > 0 ){
                 
                  long  start = SystemTime.getHighPrecisionCounter();
                 
                  write_selector.select( WRITE_SELECT_LOOP_TIME );
                 
                  long duration = SystemTime.getHighPrecisionCounter() - start;
                 
                  duration = duration/1000000;
                 
                  long  sleep = WRITE_SELECT_MIN_LOOP_TIME - duration;
                 
                  if ( sleep > 0 ){
                                       
                    try{                
                      Thread.sleep( sleep );
                     
                    }catch( Throwable e ){   
                    }
                  }
                  }else{
                   
                    write_selector.select( WRITE_SELECT_LOOP_TIME );
                 
                    write_select_count++;
                  }
                }catch( Throwable t ) {
                 
                  Debug.out( "writeSelectorLoop() EXCEPTION: ", t );
                }     
              }
          }
        };
       
      write_selector_thread.setPriority( Thread.MAX_PRIORITY - 2 );
      write_selector_thread.start();     
  }
View Full Code Here

Examples of org.gudy.azureus2.core3.util.AEThread2

      new PluginListener()
      {
        public void
        initializationComplete()
        {
          new AEThread2( "NetstatusPlugin:init", true )
          {
            public void
            run()
            {
              try{
View Full Code Here

Examples of org.gudy.azureus2.core3.util.AEThread2

      // we need to perform this test on a separate thread otherwise we'll block in the UDP handling
      // code because we're already running on the "process" callback from the UDP handler
      // (the test attempts to ping contacts)
     
   
    new AEThread2( "DHTTransportUDP:getAddress", true )
    {
      public void
      run()
      {
        try{
View Full Code Here

Examples of org.gudy.azureus2.core3.util.AEThread2

              }finally{
               
                this_mon.exit();
              }

              new AEThread2( "DHTTransportUDP:writeQueueProcessor", true )
                {
                  public void
                  run()
                  {
                    try{
View Full Code Here

Examples of org.gudy.azureus2.core3.util.AEThread2

             
          final AESemaphore  sem = new AESemaphore( "NetStatusProbe" );
         
          for (int i=0;i<num_threads;i++){
           
            new AEThread2( "NetStatusProbe", true )
            {
              public void
              run()
              {
                try{
View Full Code Here

Examples of org.gudy.azureus2.core3.util.AEThread2

  {
    synchronized( this ){

      if ( queue.size() > 0 && queue_thread == null ){
       
        queue_thread = new
          AEThread2( "XcodeQ", true )
          {
            public void
            run()
            {
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.