private void OnExecutionInterrupted(IJupyterMessageSender jupyterMessageSender) { // reply var interruptReplyPayload = new InterruptReply(); // send to server jupyterMessageSender.Send(interruptReplyPayload); }
private void OnExecutionInterrupted(CurrentCommandCancelled currentCommandCancelled, Message request, IMessageSender serverChannel) { // reply var interruptReplyPayload = new InterruptReply(); // send to server var interruptReply = Message.CreateResponse( interruptReplyPayload, request); serverChannel.Send(interruptReply); }
public Task Handle(JupyterRequestContext context) { KernelInvocationContext.Current?.Fail( new OperationCanceledException()); // reply var interruptReplyPayload = new InterruptReply(); // send to server context.JupyterMessageSender.Send(interruptReplyPayload); return(Task.CompletedTask); }
private void OnExecutionInterrupted(CurrentCommandCancelled currentCommandCancelled) { if (InFlightRequests.TryRemove(currentCommandCancelled.Command, out var openRequest)) { // reply var interruptReplyPayload = new InterruptReply(); // send to server var interruptReply = Message.CreateResponse( interruptReplyPayload, openRequest.Context.Request); openRequest.Context.ServerChannel.Send(interruptReply); openRequest.Context.RequestHandlerStatus.SetAsIdle(); openRequest.Dispose(); } }