prevent threads with a sequential task running parralelly to update table in a sequential manner

85 views
Skip to first unread message

kushal bhattacharya

unread,
Mar 21, 2017, 3:12:47 AM3/21/17
to SG11 - Databases
Hi,
The issue i am facing right now is,I am runnig threads parralllely and according in these parrallel threads i am performing some sort of sequential updation on the table.To explain the scenario i am working on mqtt.So suppose i sending a packet as PUBRECV,then it should update the previous state to PUBRECV .After that the client sends PUBREL packet which is recieved by my program which then sends PUBCOMP packet and deletes that entry from the row.But what i am facing is when i am sending PUBRECV packet to client on the true value i am upting the entry and before this updation has been done the PUBREL packet comes along and searches for that updated  entry and finds none since its not done till now.So How can i do this sequential operation on the table itself?
Thanks,
Kushal

Johann Anhofer

unread,
Mar 21, 2017, 3:33:59 AM3/21/17
to SG11 - Databases
This forum is for discussions about C++ standard and Database interfaces for C++.

Ask your question at:
http://stackoverflow.com/

Johann
Reply all
Reply to author
Forward
0 new messages