waitUntil

inline fun waitUntil(block: () -> Boolean)

Thread.sleep until some condition is met. This shouldn't be used from coroutines, only java threads.