hbUCPSetTaskDoneCb
Register a callback function, this callback function is executed automatically after the task is completed.
-
Parameter
- [in]
taskHandleTask handle pointer. - [in]
taskDoneCbCallback function pointer. - [in]
userdataUser-defined data.
- [in]
-
Return Value
- Return
0means the API was successfully executed, otherwise the execution failed.
- Return
Note
This interface allows you to register a callback function that will be called to perform a user-defined function when the task is completed.
If you don't need to customize the input, you can set userdata to nullptr.
Please do not call hbUCPReleaseTask to release the task in the callback function, otherwise undefined behavior may occur.
