public static synchronized void asyncSampleSystemNow ( final boolean medium , final boolean large ) { // slow mode starts an async thread if ( mode == GetRSSMode . PS ) { if ( thread != null ) { if ( thread . isAlive ( ) ) return ; else thread = null ; } thread = new Thread ( new Runnable ( ) { @ Override public void run ( ) { sampleSystemNow ( medium , large ) ; } } ) ; thread . start ( ) ; } // fast mode doesn't spawn a thread else { sampleSystemNow ( medium , large ) ; } }
Fire off a thread to asynchronously collect stats .