renderer: reduce thread ping ponging by using real condition variable