Question: "mco_translog_iterate" calls a callback function which processes the transaction data passing through the pipe. The callback function signature is MCO_RET (*iteration_callback_proc)(mco_trans_h trans, MCO_Hf* obj, int cid, int obj_state, void* user_ctx) .Can we copy the values of parameter “obj” and “cid” to other variables and use the copied value in other thread to improve performance?
Answer: MCO_Hf* is an object handle. Like all object handles, transaction handles, etc, it is only valid for the current thread. You can use it to extract the object’s field values and pass those to another function in another thread. But you can’t pass the MCO_Hf* itself.