equal
deleted
inserted
replaced
343 All asynchronous messages are decorated with the task identifier that was |
343 All asynchronous messages are decorated with the task identifier that was |
344 revealed in the immediate (synchronous) result. Thus the client can |
344 revealed in the immediate (synchronous) result. Thus the client can |
345 invoke further asynchronous commands and still dispatch the resulting stream of |
345 invoke further asynchronous commands and still dispatch the resulting stream of |
346 asynchronous messages properly. |
346 asynchronous messages properly. |
347 |
347 |
348 The synchronous command \<^verbatim>\<open>cancel\<close>~\<open>id\<close> tells the specified task to terminate |
348 The synchronous command \<^verbatim>\<open>cancel {"task":\<close>~\<open>id\<close>\<^verbatim>\<open>}\<close> tells the specified task |
349 prematurely: usually causing a \<^verbatim>\<open>FAILED\<close> result, but this is not guaranteed: |
349 to terminate prematurely: usually causing a \<^verbatim>\<open>FAILED\<close> result, but this is |
350 the cancel event may come too late or the running process may just ignore |
350 not guaranteed: the cancel event may come too late or the running process |
351 it. |
351 may just ignore it. |
352 \<close> |
352 \<close> |
353 |
353 |
354 |
354 |
355 section \<open>Types for JSON values \label{sec:json-types}\<close> |
355 section \<open>Types for JSON values \label{sec:json-types}\<close> |
356 |
356 |
589 |
589 |
590 subsection \<open>Command \<^verbatim>\<open>cancel\<close>\<close> |
590 subsection \<open>Command \<^verbatim>\<open>cancel\<close>\<close> |
591 |
591 |
592 text \<open> |
592 text \<open> |
593 \begin{tabular}{ll} |
593 \begin{tabular}{ll} |
594 argument: & \<open>uuid\<close> \\ |
594 argument: & \<open>task\<close> \\ |
595 regular result: & \<^verbatim>\<open>OK\<close> \\ |
595 regular result: & \<^verbatim>\<open>OK\<close> \\ |
596 \end{tabular} |
596 \end{tabular} |
597 \<^medskip> |
597 \<^medskip> |
598 |
598 |
599 The command invocation \<^verbatim>\<open>cancel "\<close>\<open>uuid\<close>\<^verbatim>\<open>"\<close> attempts to cancel the |
599 The command invocation \<^verbatim>\<open>cancel {"task":\<close>~\<open>id\<close>\<^verbatim>\<open>}\<close> attempts to cancel the |
600 specified task. |
600 specified task. |
601 |
601 |
602 Cancellation is merely a hint that the client prefers an ongoing process to |
602 Cancellation is merely a hint that the client prefers an ongoing process to |
603 be stopped. The command always succeeds formally, but it may get ignored by |
603 be stopped. The command always succeeds formally, but it may get ignored by |
604 a task that is still running; it might also refer to a non-existing or |
604 a task that is still running; it might also refer to a non-existing or |
826 |
826 |
827 subsection \<open>Command \<^verbatim>\<open>session_stop\<close>\<close> |
827 subsection \<open>Command \<^verbatim>\<open>session_stop\<close>\<close> |
828 |
828 |
829 text \<open> |
829 text \<open> |
830 \begin{tabular}{ll} |
830 \begin{tabular}{ll} |
831 argument: & \<open>{session_id?: uuid}\<close> \\ |
831 argument: & \<open>{session_id: uuid}\<close> \\ |
832 immediate result: & \<^verbatim>\<open>OK\<close> \<open>task\<close> \\ |
832 immediate result: & \<^verbatim>\<open>OK\<close> \<open>task\<close> \\ |
833 regular result: & \<^verbatim>\<open>FINISHED\<close> \<open>task \<oplus> session_stop_result\<close> \\ |
833 regular result: & \<^verbatim>\<open>FINISHED\<close> \<open>task \<oplus> session_stop_result\<close> \\ |
834 error result: & \<^verbatim>\<open>FAILED\<close> \<open>task \<oplus> error_message \<oplus> session_stop_result\<close> \\[2ex] |
834 error result: & \<^verbatim>\<open>FAILED\<close> \<open>task \<oplus> error_message \<oplus> session_stop_result\<close> \\[2ex] |
835 \end{tabular} |
835 \end{tabular} |
836 |
836 |