Fix hang when cancelling after perform

RunOnce now waits for a cancelled result if cancelled.