@Override
	public void execute(Runnable task) {
        queue.add(task);

        if (!running) {
            while (!queue.isEmpty()) {
                Runnable nextTask = queue.remove(queue.size() - 1);
                running = true;
                nextTask.run();
                running = false;
            }
        }
    }