FRunnable::Run() - how to wait around?

I have an FRunnable running on a different thread, and I want to communicate with it with a couple of TQueue’s - one TQueue is a command queue that sends messages to the FRunnable, the other TQeueu is a result queue that sends messages from the FRunnable to the game thread code.

In FRunnable::Run(), I read from the command queue and do work, enqueueing results in the result queue as I go. When there are no further commands in the command queue … what do I do? I can’t leave FRunnable::Run() because that’s the thread function and that will end the thread (which I don’t want to do until someone calls FRunnable::Stop()). What’s the right thing here? TQueue itself doesn’t have a wait mechanism in it. I guess I could probably add a condition variable of some kind to wait on and then the game thread could signal that when it enqueue’s something? Is there another more obvious mechanism to use?