Function Cancellation.doCancel
Requests that the server abandon processing of the current command
void doCancel();
Throws exception if cancel request was not successfully dispatched.
Successful dispatch is no guarantee that the request will have any effect, however. If the cancellation is effective, the current command will terminate early and return an error result (exception). If the cancellation fails (say, because the server was already done processing the command), then there will be no visible result at all.