public synchronized void pushLayerEvent(int layerEventType,Layer[] layers){
  if (synchronous) {
    fireLayer(layerEventType,layers);
  }
 else {
    events.add(new SetLayerRunnable(layerEventType,layers));
    if (t == null || !t.isAlive()) {
      SetLayerRunnable runnable=popLayerEvent();
      if (runnable != null) {
        t=new Thread(runnable);
        t.start();
      }
    }
  }
}

public synchronized void pushLayerEvent ( int layerEventType , Layer [ ] layers ) { if ( synchronous ) { fireLayer ( layerEventType , layers ) ; } else { events . add ( new SetLayerRunnable ( layerEventType , layers ) ) ; if ( t == null || ! t . isAlive ( ) ) { SetLayerRunnable runnable = popLayerEvent ( ) ; if ( runnable != null ) { t = new Thread ( runnable ) ; t . start ( ) ; } } } }
pushed the information onto a vector stack to get executed by a separate thread . any thread launched is held on to , and if that thread is is null or not active , a new thread is kicked off . the dying thread checks the vector stack and fires another event if it can .
