"use strict";(self.webpackChunkdocs_site=self.webpackChunkdocs_site||[]).push([[5574],{3744:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>i,contentTitle:()=>r,default:()=>d,frontMatter:()=>c,metadata:()=>t,toc:()=>o});const t=JSON.parse('{"id":"XXTLanControl.lua/assist/cancel_all","title":"Cancel Current Script Requests (LCC.assist.cancel_all)","description":"Declaration","source":"@site/i18n/en/docusaurus-plugin-content-docs/current/XXTLanControl.lua/assist/cancel_all.md","sourceDirName":"XXTLanControl.lua/assist","slug":"/XXTLanControl.lua/assist/cancel_all","permalink":"/docs/en/XXTLanControl.lua/assist/cancel_all","draft":false,"unlisted":false,"tags":[],"version":"current","sidebarPosition":80,"frontMatter":{"sidebar_position":80},"sidebar":"tutorialSidebar","previous":{"title":"Cancel One Request (LCC.assist.cancel)","permalink":"/docs/en/XXTLanControl.lua/assist/cancel"},"next":{"title":"KVDB Overview","permalink":"/docs/en/XXTLanControl.lua/kvdb/"}}');var l=s(4848),a=s(8453);const c={sidebar_position:80},r="Cancel Current Script Requests (LCC.assist.cancel_all)",i={},o=[{value:"Declaration",id:"declaration",level:2},{value:"Parameters",id:"parameters",level:2},{value:"Return Values",id:"return-values",level:2},{value:"Notes",id:"notes",level:2},{value:"Example",id:"example",level:2}];function u(e){const n={blockquote:"blockquote",br:"br",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",ul:"ul",...(0,a.R)(),...e.components};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(n.header,{children:(0,l.jsx)(n.h1,{id:"cancel-current-script-requests-lccassistcancel_all",children:"Cancel Current Script Requests (LCC.assist.cancel_all)"})}),"\n",(0,l.jsx)(n.h2,{id:"declaration",children:"Declaration"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-lua",children:"count = LCC.assist.cancel_all(timeout?)\n"})}),"\n",(0,l.jsx)(n.h2,{id:"parameters",children:"Parameters"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["timeout",(0,l.jsx)(n.br,{}),"\n","Number, optional. Per-request cancel timeout in seconds. Defaults to ",(0,l.jsx)(n.code,{children:"5"}),"."]}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"return-values",children:"Return Values"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["count",(0,l.jsx)(n.br,{}),"\n","Number. Count of successfully cancelled requests."]}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"notes",children:"Notes"}),"\n",(0,l.jsxs)(n.blockquote,{children:["\n",(0,l.jsxs)(n.p,{children:["Cancels only unfinished requests created and still tracked by the current script instance.",(0,l.jsx)(n.br,{}),"\n","It does not cancel requests from other devices or requests created by other script instances.",(0,l.jsx)(n.br,{}),"\n","When the script exits, the SDK automatically calls ",(0,l.jsx)(n.code,{children:"cancel_all(3)"})," to clean up unfinished requests."]}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"example",children:"Example"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-lua",children:'local count = LCC.assist.cancel_all()\nnLog("cancelled assist requests", count)\n'})})]})}function d(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,l.jsx)(n,{...e,children:(0,l.jsx)(u,{...e})}):u(e)}},8453:(e,n,s)=>{s.d(n,{R:()=>c,x:()=>r});var t=s(6540);const l={},a=t.createContext(l);function c(e){const n=t.useContext(a);return t.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(l):e.components||l:c(e.components),t.createElement(a.Provider,{value:n},e.children)}}}]);