{"id":276,"date":"2003-02-17T00:06:04","date_gmt":"2003-02-17T04:06:04","guid":{"rendered":"http:\/\/wordpress.cephas.net\/?p=276"},"modified":"2003-02-17T00:06:04","modified_gmt":"2003-02-17T04:06:04","slug":"using-the-volatile-keyword-in-java","status":"publish","type":"post","link":"https:\/\/cephas.net\/blog\/2003\/02\/17\/using-the-volatile-keyword-in-java\/","title":{"rendered":"Using the volatile keyword in Java"},"content":{"rendered":"<p>Using the <a href=\"http:\/\/www7b.boulder.ibm.com\/vajdoc\/vahwebx.exe\/en_US\/vj32\/Extract\/0\/ide\/ref\/rikvolat.htm\">volatile<\/a> keyword in Java.<\/p>\n<p>&#8220;<i>The volatile modifier is used when you are working with multiple threads.<\/p>\n<p>The Java language allows threads that access shared variables to keep private working copies of the variables; this allows a more efficient implementation of multiple threads. These working copies need be reconciled with the master copies in the shared main memory only at prescribed synchronization points, namely when objects are locked or unlocked. As a rule, to ensure that shared variables are consistently and reliably updated, a thread should ensure that it has exclusive use of such variables by obtaining a lock that, conventionally, enforces mutual exclusion for those shared variables. <\/i>&#8220;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Using the volatile keyword in Java. &#8220;The volatile modifier is used when you are working with multiple threads. The Java language allows threads that access shared variables to keep private working copies of the variables; this allows a more efficient implementation of multiple threads. These working copies need be reconciled with the master copies in &hellip; <a href=\"https:\/\/cephas.net\/blog\/2003\/02\/17\/using-the-volatile-keyword-in-java\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Using the volatile keyword in Java<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[3],"tags":[],"_links":{"self":[{"href":"https:\/\/cephas.net\/blog\/wp-json\/wp\/v2\/posts\/276"}],"collection":[{"href":"https:\/\/cephas.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cephas.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cephas.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cephas.net\/blog\/wp-json\/wp\/v2\/comments?post=276"}],"version-history":[{"count":0,"href":"https:\/\/cephas.net\/blog\/wp-json\/wp\/v2\/posts\/276\/revisions"}],"wp:attachment":[{"href":"https:\/\/cephas.net\/blog\/wp-json\/wp\/v2\/media?parent=276"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cephas.net\/blog\/wp-json\/wp\/v2\/categories?post=276"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cephas.net\/blog\/wp-json\/wp\/v2\/tags?post=276"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}