class SequentialExecutor implements Executor {

    @Override
    public void execute(Runnable command)
    {
        boolean needExecute;
        synchronized (myWorkQueue)
        {
            myWorkQueue.add(command);
            if (myPending)
            {
                needExecute = false;
            }
            else
            {
                needExecute = true;
                myPending = true;
            }
        }
        if (needExecute)
        {
            myExecutor.execute(myTask);
        }
    }

    public  SequentialExecutor(Executor executor);

}