Isn't there this while(engine_frame()) construct for overcoming the need of wait()?