private void thread_command() { Cmd cmd = CommandPool.EndQueue(); while (cmd != null) { cmd.Execute(); cmd = CommandPool.EndQueue(); } }