Coutine for commit