I need to use the wait function on the main thread, from a separate thread. That's about it. And no, I can't find another solution.
wait