Add create_lock, wait, and reume