
{"id":6397,"date":"2011-12-09T19:24:09","date_gmt":"2011-12-09T19:24:09","guid":{"rendered":"http:\/\/www.beautifulwork.org\/?p=6397"},"modified":"2011-12-09T19:24:09","modified_gmt":"2011-12-09T19:24:09","slug":"mutex_init","status":"publish","type":"post","link":"https:\/\/www.trueangle.org\/index.php\/2011\/12\/09\/mutex_init\/","title":{"rendered":"mutex_init ."},"content":{"rendered":"<p>1. mutex_init<\/p>\n<pre>\nInitialize the mutex to unlocked state.\n<\/pre>\n<p>\n2. Classroom<\/p>\n<pre>\nThe point of a mutex  is to synchronize two threads. When\nyou  have  two  threads  attempting to  access  a  single\nresource, the general pattern  is to have the first block\nof  code  attempting  access  to  set  the  mutex  before\nentering the  code. When  the second code  block attempts\naccess,  it sees  the mutex  is set  and waits  until the\nfirst block of code  is complete (and un-sets the mutex),\nthen continues.\n\n<\/pre>\n<p>source : http:\/\/stackoverflow.com\/questions\/34524\/what-is-a-mutex<\/p>\n","protected":false},"excerpt":{"rendered":"<p>1. mutex_init Initialize the mutex to unlocked state. 2. Classroom The point of a mutex is to synchronize two threads. When you have two threads attempting to access a single resource, the general pattern is to have the first block of code attempting access to set the mutex before entering the code. When the second &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.trueangle.org\/index.php\/2011\/12\/09\/mutex_init\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;mutex_init .&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts\/6397"}],"collection":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/comments?post=6397"}],"version-history":[{"count":0,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts\/6397\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/media?parent=6397"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/categories?post=6397"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/tags?post=6397"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}