"use strict";(self.webpackChunkdocs_site=self.webpackChunkdocs_site||[]).push([[5040],{3209:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>l,contentTitle:()=>a,default:()=>d,frontMatter:()=>o,metadata:()=>r,toc:()=>i});const r=JSON.parse('{"id":"XXTLanControl.lua/kvdb/queue/push_back","title":"Push To Queue Back (LCC.kvdb.queue.push_back)","description":"Signature","source":"@site/i18n/en/docusaurus-plugin-content-docs/current/XXTLanControl.lua/kvdb/queue/push_back.md","sourceDirName":"XXTLanControl.lua/kvdb/queue","slug":"/XXTLanControl.lua/kvdb/queue/push_back","permalink":"/docs/en/XXTLanControl.lua/kvdb/queue/push_back","draft":false,"unlisted":false,"tags":[],"version":"current","sidebarPosition":30,"frontMatter":{"sidebar_position":30},"sidebar":"tutorialSidebar","previous":{"title":"Push To Queue Front (LCC.kvdb.queue.push_front)","permalink":"/docs/en/XXTLanControl.lua/kvdb/queue/push_front"},"next":{"title":"Pop From Queue Front (LCC.kvdb.queue.pop_front)","permalink":"/docs/en/XXTLanControl.lua/kvdb/queue/pop_front"}}');var u=s(4848),t=s(8453);const o={sidebar_position:30},a="Push To Queue Back (LCC.kvdb.queue.push_back)",l={},i=[{value:"Signature",id:"signature",level:2},{value:"Parameters",id:"parameters",level:2},{value:"Returns",id:"returns",level:2},{value:"Notes",id:"notes",level:2},{value:"Example",id:"example",level:2}];function c(e){const n={blockquote:"blockquote",br:"br",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",ul:"ul",...(0,t.R)(),...e.components};return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(n.header,{children:(0,u.jsx)(n.h1,{id:"push-to-queue-back-lcckvdbqueuepush_back",children:"Push To Queue Back (LCC.kvdb.queue.push_back)"})}),"\n",(0,u.jsx)(n.h2,{id:"signature",children:"Signature"}),"\n",(0,u.jsx)(n.pre,{children:(0,u.jsx)(n.code,{className:"language-lua",children:"size, err = LCC.kvdb.queue.push_back(name, value, timeout?)\n"})}),"\n",(0,u.jsx)(n.h2,{id:"parameters",children:"Parameters"}),"\n",(0,u.jsxs)(n.ul,{children:["\n",(0,u.jsxs)(n.li,{children:["name",(0,u.jsx)(n.br,{}),"\n","String. Queue name (non-empty, max ",(0,u.jsx)(n.code,{children:"256"})," bytes)."]}),"\n",(0,u.jsxs)(n.li,{children:["value",(0,u.jsx)(n.br,{}),"\n","String. Value to push (must be valid UTF-8)."]}),"\n",(0,u.jsxs)(n.li,{children:["timeout",(0,u.jsx)(n.br,{}),"\n","Number, optional. Request timeout in seconds, default ",(0,u.jsx)(n.code,{children:"60"}),"."]}),"\n"]}),"\n",(0,u.jsx)(n.h2,{id:"returns",children:"Returns"}),"\n",(0,u.jsxs)(n.ul,{children:["\n",(0,u.jsxs)(n.li,{children:["size",(0,u.jsx)(n.br,{}),"\n","Number. Queue length after the push; ",(0,u.jsx)(n.code,{children:"nil"})," on failure."]}),"\n",(0,u.jsxs)(n.li,{children:["err",(0,u.jsx)(n.br,{}),"\n","String or ",(0,u.jsx)(n.code,{children:"nil"}),". Error description when the call fails."]}),"\n"]}),"\n",(0,u.jsx)(n.h2,{id:"notes",children:"Notes"}),"\n",(0,u.jsxs)(n.blockquote,{children:["\n",(0,u.jsxs)(n.p,{children:["Pushes an item onto the tail of the queue.",(0,u.jsx)(n.br,{}),"\n","Shares the same constraints as ",(0,u.jsx)(n.code,{children:"push_front"}),"."]}),"\n"]}),"\n",(0,u.jsx)(n.h2,{id:"example",children:"Example"}),"\n",(0,u.jsx)(n.pre,{children:(0,u.jsx)(n.code,{className:"language-lua",children:'local size, err = LCC.kvdb.queue.push_back("pending", "task#2")\nif not size then\n    error(err)\nend\n'})})]})}function d(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,u.jsx)(n,{...e,children:(0,u.jsx)(c,{...e})}):c(e)}},8453:(e,n,s)=>{s.d(n,{R:()=>o,x:()=>a});var r=s(6540);const u={},t=r.createContext(u);function o(e){const n=r.useContext(t);return r.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(u):e.components||u:o(e.components),r.createElement(t.Provider,{value:n},e.children)}}}]);