-
C API, calling k within a thread
I am running a single threaded C++ program which publishes tables A and B.
I am using the k function below to publish the updates asynchronously.
k(-handle, (S)”.u.upd”, ks((S)table_name), data, (K)0)
I am not explicitly calling r0(data) on the data because calling the k function decrements the reference count.
I have confirmed this to be the case by running m4(0) before and after the call to k.
My question is, do I need to change anything in terms of memory management if I want to move the publishing of tables A and B into separate threads? Is it ok to call k from within a thread? Can both threads call k at the same time for instance? Just want to be aware of the dangers if any
Thanks
Log in to reply.