public synchronized static Task queue ( Listener callback ) { final Task task = new Task ( callback ) ; // TODO: synchronization? if ( THREAD != null && THREAD . isAlive ( ) ) { THREAD . queue . add ( task ) ; return task ; } THREAD = new ThumbnailThread ( ) ; THREAD . queue . add ( task ) ; THREAD . start ( ) ; return task ; }
Queue a thumbnail task in a global thumbnail thread .