public static void replaceMainThreadExecutor ( MainThreadExecutor executor ) { MainThreadExecutor previous ; synchronized ( LCCore . class ) { previous = mainThreadExecutor ; mainThreadExecutor = executor ; } do { Runnable toExecute = previous . pop ( ) ; if ( toExecute == null ) break ; executor . execute ( toExecute ) ; } while ( true ) ; }
Replace the main thread executor .