I have a custom post type (product) that have a meta field that hold's inventory quantity.
Once an order is made im updating the quantity
`$qty=get_post_meta($post->ID,'stock',true);
$qty--;
Update_post_meta($post->ID,'stock',$qty);`
The thing is im afraid that multiple and simultanious calls for this update Might cause the data to be incorrect If a call will be made while another call is in process...
Is there a way to lock that piece of code and make sure it wont be fired Simultaniously or am i exadurating in my concerns ?