protected VirtualAcceptSelector() { AEThread select_thread = new AEThread( "Accept Selector" ) { @Override public void runSupport() { while( true ) { try{ accept_selector.select( 50 ); }catch( Throwable e ){ Debug.printStackTrace(e); } } } }; select_thread.setDaemon( true ); select_thread.start(); }
public static boolean isOurThread( Thread thread ) { return( AEThread.isOurThread( thread )); }
public static void setOurThread() { AEThread.setOurThread(); }
thread.setPriority( Thread.MAX_PRIORITY ); thread.setDaemon( true ); thread.start();
t.setPriority(Thread.NORM_PRIORITY - 1); t.start();
thread.start();
public AEThread( String name, boolean daemon ) { super(name); setDaemon( daemon ); }
@Override public void run() { if ( AEThread2.TRACE_TIMES ){ System.out.println( TimeFormatter.milliStamp() + ": AEThread:start: " + this ); } try{ /* if ( !isDaemon()){ System.out.println( "non-daemon thread:" + this ); } */ runSupport(); }catch( Throwable e ){ DebugLight.printStackTrace(e); } // System.out.println( "Stop: " + this ); }
new AEThread( "TorrentDownloader:statusreader" )
thread.setPriority(Thread.NORM_PRIORITY - 1); thread.start(); } catch (Exception e) { Debug.out(e);
@Override public boolean completed(ResourceDownloader downloader, InputStream data) { downloader.removeListener(this); if (!nextUpdate()) { // fire in another thread so completed function can exit AEThread thread = new AEThread("AllDownloadsComplete", true) { @Override public void runSupport() { allDownloadsComplete(); } }; thread.start(); } return true; }
public AEThread( String name ) { super(name); setDaemon( false ); }
public static void setOurThread( Thread thread ) { AEThread.setOurThread( thread ); }
public static void setOurThread() { setOurThread( Thread.currentThread()); }