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

From: kushal bhattacharya <bhattacharya.kushal4_at_gmail.com>
Date: Sat, 18 Mar 2017 23:35:51 -0700 (PDT)
Message-ID: <991dc773-d4f6-459a-8b7f-2b1ea1f59990_at_googlegroups.com>



Hi,
[Quoted] 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 Received on Sun Mar 19 2017 - 07:35:51 CET

Original text of this message