Problem with transaction log iterate

来源:互联网 发布:磁力解析在线播放软件 编辑:程序博客网 时间:2024/05/17 00:52

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.

0 0
原创粉丝点击