{"id":2965,"date":"2026-11-10T08:04:08","date_gmt":"2026-11-10T08:04:08","guid":{"rendered":"https:\/\/wiki.designcorner.co.ke\/?dc_term=race-condition"},"modified":"2026-11-10T08:04:08","modified_gmt":"2026-11-10T08:04:08","slug":"race-condition","status":"publish","type":"dc_term","link":"https:\/\/wiki.designcorner.co.ke\/?dc_term=race-condition","title":{"rendered":"Race Condition"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">What it is<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">When two processes touch the same data at nearly the same time, the outcome can change depending on timing. The bug appears randomly and is hard to reproduce.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Why it matters for your business<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">In shops and booking systems it can cause double sales or double bookings.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Real-world example<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Two customers pay for the last pair of shoes in an online shop at the same second, and the system sells the same stock twice.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Design Corner tip<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Ask your developer to lock stock and booking records while an order is being processed.<\/p>\n\n\n","protected":false},"excerpt":{"rendered":"<p>A bug where a program&#8217;s result depends on which of two simultaneous actions finishes first.<\/p>\n","protected":false},"featured_media":0,"template":"","dc_letter":[23],"dc_topic":[34],"class_list":["post-2965","dc_term","type-dc_term","status-publish","hentry","dc_letter-r","dc_topic-software-and-development"],"_links":{"self":[{"href":"https:\/\/wiki.designcorner.co.ke\/index.php?rest_route=\/wp\/v2\/dc_term\/2965","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wiki.designcorner.co.ke\/index.php?rest_route=\/wp\/v2\/dc_term"}],"about":[{"href":"https:\/\/wiki.designcorner.co.ke\/index.php?rest_route=\/wp\/v2\/types\/dc_term"}],"version-history":[{"count":0,"href":"https:\/\/wiki.designcorner.co.ke\/index.php?rest_route=\/wp\/v2\/dc_term\/2965\/revisions"}],"wp:attachment":[{"href":"https:\/\/wiki.designcorner.co.ke\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2965"}],"wp:term":[{"taxonomy":"dc_letter","embeddable":true,"href":"https:\/\/wiki.designcorner.co.ke\/index.php?rest_route=%2Fwp%2Fv2%2Fdc_letter&post=2965"},{"taxonomy":"dc_topic","embeddable":true,"href":"https:\/\/wiki.designcorner.co.ke\/index.php?rest_route=%2Fwp%2Fv2%2Fdc_topic&post=2965"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}