"use strict";(self.webpackChunkrspress_doc_template=self.webpackChunkrspress_doc_template||[]).push([["7482"],{1018:function(e,s,n){n.r(s);var i=n(85893),l=n(50065);function c(e){let s=Object.assign({h1:"h1",a:"a",pre:"pre",code:"code",span:"span",p:"p",ul:"ul",li:"li",div:"div"},(0,l.ah)(),e.components);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(s.h1,{id:"hbucpsettaskdonecb",children:[(0,i.jsx)(s.a,{className:"header-anchor","aria-hidden":"true",href:"#hbucpsettaskdonecb",children:"#"}),"hbUCPSetTaskDoneCb"]}),"\n",(0,i.jsx)(s.pre,{className:"code",children:(0,i.jsx)(s.pre,{className:"shiki css-variables has-line-number",style:{backgroundColor:"var(--shiki-color-background)"},tabIndex:"0",children:(0,i.jsxs)(s.code,{className:"language-cpp",meta:"",children:[(0,i.jsxs)(s.span,{className:"line line-number",children:[(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"int32_t"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"hbUCPSetTaskDoneCb"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"hbUCPTaskHandle_t"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" taskHandle"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,i.jsxs)(s.span,{className:"line line-number",children:[(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"                           "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"hbUCPTaskDoneCb"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" taskDoneCb"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"void"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"*"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"userdata);"})]}),"\n"]})})}),"\n",(0,i.jsx)(s.p,{children:"Register a callback function, this callback function is executed automatically after the task is completed."}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsx)(s.p,{children:"Parameter"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["[in] ",(0,i.jsx)(s.code,{children:"taskHandle"})," Task handle pointer."]}),"\n",(0,i.jsxs)(s.li,{children:["[in] ",(0,i.jsx)(s.code,{children:"taskDoneCb"})," Callback function pointer."]}),"\n",(0,i.jsxs)(s.li,{children:["[in] ",(0,i.jsx)(s.code,{children:"userdata"})," User-defined data."]}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsx)(s.p,{children:"Return Value"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["Return ",(0,i.jsx)(s.code,{children:"0"})," means the API was successfully executed, otherwise the execution failed."]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(s.div,{className:"rspress-directive info",children:[(0,i.jsx)(s.div,{className:"rspress-directive-title",children:"Note"}),(0,i.jsxs)(s.div,{className:"rspress-directive-content",children:["This interface allows you to register a callback function that will be called to perform a user-defined function when the task is completed.\nIf you don't need to customize the input, you can set userdata to nullptr.\nPlease do not call ",(0,i.jsx)(s.code,{children:"hbUCPReleaseTask"}),(0,i.jsx)(s.p,{children:"to release the task in the callback function, otherwise undefined behavior may occur."})]})]})]})}function r(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:s}=Object.assign({},(0,l.ah)(),e.components);return s?(0,i.jsx)(s,Object.assign({},e,{children:(0,i.jsx)(c,e)})):c(e)}s.default=r,r.__RSPRESS_PAGE_META={},r.__RSPRESS_PAGE_META["latest%2Fen%2Fguide%2Fucp%2Fucp_api_reference%2Fucp_api_function_interface%2Fhbucpsettaskdonecb.mdx"]={toc:[],title:"hbUCPSetTaskDoneCb",frontmatter:{}}}}]);