waitAnyCancel should be using restoreM