cancel Stops any work the promise is doing. Declarationvoid cancel(); DiscussionWhen called, it throws a CancelledError.