``` bool HostQueue::terminate() { ..... // Wake-up the command loop, so it can exit { ScopedLock sl(queueLock_); thread_.acceptingCommands_ = false; queueLock_.notify(); } // FIXME_lmoriche: fix termination handshake while (thread_.state() < Thread::FINISHED) { Os::yield(); } // Release last enque command !! Memory leak if (lastEnqueueCommand_ != nullptr) { lastEnqueueCommand_->release(); lastEnqueueCommand_ = nullptr; } } ```