function cb (h, evt)
  persistent running

  if (! running)
    running = true;
    tmp = 0;
    tic ();
    set (h, "color", "r")
    while (tmp < 3)
      if (toc > 5)
        tic ();
        tmp = tmp + 1;
        data = getappdata (gcbf, "execution");
        if (isempty (data))
          data = {};
        endif
        data = [data, "axes executing drawnow"];
        setappdata (gcbf, "execution", data)
        disp ("Flushing event queue")
        set (h, "color", rand (1,3))
        if (0)
          drawnow ()
        elseif (0)
          [~] = getframe ();
        elseif (0)
          delete (figure ());
        elseif (0)
          pause (.001);
        elseif (0)
          waitfor (h, "timeout", 1);
        elseif (1)
          ## Add a child with "deletefcn" -> @cb2
          cla (h);
          drawnow ();
        else
          ## All callbacks should be queued
        endif
      endif
    endwhile
  endif
  running = false;
end
