Register a callback function, this callback function is executed automatically after the task is completed.
Parameter
taskHandle Task handle pointer.taskDoneCb Callback function pointer.userdata User-defined data.Return Value
0, the callback function is registered successfully, otherwise the registration fails.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.