{"id":1663,"date":"2022-07-09T16:17:01","date_gmt":"2022-07-09T10:47:01","guid":{"rendered":"http:\/\/coderzpy.com\/?p=1663"},"modified":"2022-07-09T16:17:03","modified_gmt":"2022-07-09T10:47:03","slug":"inter-thread-communication-in-java","status":"publish","type":"post","link":"https:\/\/coderzpy.com\/java\/inter-thread-communication-in-java\/","title":{"rendered":"Inter-thread Communication in Java"},"content":{"rendered":"\n<h5 class=\"wp-block-heading\">What is Inter-thread Communication?<\/h5>\n\n\n\n<p class=\"wp-block-paragraph\">Java has a mechanism called inter-thread communication that allows another thread to enter (or lock) a paused thread&#8217;s critical section so that it can be executed.<\/p>\n\n\n\n<h5 class=\"wp-block-heading\">What is polling, and what are its drawbacks?<\/h5>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Polling<\/strong> is the process of repeatedly testing a condition until it holds true. Loops are frequently used to implement polling in order to determine whether a specific condition is true or false. If it is real, a particular thing happens. Due to this, the implementation uses up a lot of CPU cycles inefficiently.<\/p>\n\n\n\n<h5 class=\"wp-block-heading\">Java multi-threading approach to prevent\u00a0this issue:<\/h5>\n\n\n\n<p class=\"wp-block-paragraph\">Java uses the <strong>wait()<\/strong>, <strong>notify()<\/strong>, and <strong>notifyAll()<\/strong> methods to avoid polling. All of these methods are final members of the object class, making them available to all classes. They can only be used inside a synchronized block.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>When a different thread enters the same monitor and calls notify, <strong>wait() <\/strong>instructs the calling thread to release the lock and go to <strong>sleep()<\/strong>.<\/li><li>One thread called <strong>wait()<\/strong> on the same object is awakened by <strong>notify()<\/strong>. One thing to keep in mind is that using <strong>notify()<\/strong> does not release a lock on a resource.<\/li><li>Notifies every thread that has called <strong>wait()<\/strong> on an object, using the <strong>notifyAll()<\/strong> function.<\/li><\/ul>\n\n\n\n<h5 class=\"wp-block-heading\">Difference between wait and sleep<\/h5>\n\n\n\n<p class=\"wp-block-paragraph\">Let&#8217;s examine the key distinctions between the wait and sleep methods.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><th>wait()<\/th><th>sleep()<\/th><\/tr><tr><td>The lock is released by the wait() method.<\/td><td>The lock is not released by the sleep() method.<\/td><\/tr><tr><td>It is a method of the class Object.<\/td><td>It is a thread class method.<\/td><\/tr><tr><td>Furthermore, it is the non-static method<\/td><td>It is the static method<\/td><\/tr><tr><td>It should be notified by notify() or notifyAll() methods<\/td><td>After the specified amount of time, sleep is completed.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h5 class=\"wp-block-heading\">Example<\/h5>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/In this program, we will understand how to use wait and notify.\n\/\/ It is the most efficient way for thread communication.\npublic class A \n{\n int i;\t\n boolean flag = false; \/\/ flag will be true when data production is over.\nsynchronized void deliver(int i)\n{\n if(flag)\n try\n {\n  wait(); \/\/ Wait till a notification is received from Thread2. There will be no wastage of time.\t \n }\n catch(InterruptedException ie)\n {\n  System.out.println(ie);\t \n }\n   this.i = i;\t\n   flag = true; \/\/ When data production is over, it will store true into flag.\n   System.out.println(\"Data Delivered: \" +i);\n   notify(); \/\/ When data production is over, it will notify Thread2 to use it.\n }\nsynchronized int receive()\n{\nif(!flag)\ntry {\n wait(); \/\/ Wait till a notification is received from Thread1.\t\n}\ncatch(InterruptedException ie){\n System.out.println(ie);\t\n}\n System.out.println(\"Data Received: \" + I); \n  flag = false; \/\/ It will store false into flag when data is received.\n  notify(); \/\/ When data received is over, it will notify Thread1 to produce next data.\n  return i;\n }\n}\npublic class Thread1 extends Thread\n{\n A obj;\n Thread1(A obj)\n {\n  this.obj = obj;\n }\npublic void run()\n{\nfor(int j = 1; j &lt;= 5; j++){\n obj.deliver(j); \t\n  }\n}}\npublic class Thread2 extends Thread \n{\nA obj;\nThread2(A obj)\n{\n this.obj = obj;\n}\npublic void run()\n{\nfor(int k = 0; k &lt;= 5; k++){\n obj.receive();\t\n}\n }}\npublic class Communication \n{\npublic static void main(String&#091;] args) \n{\n A obj = new A(); \/\/ Creating an object of class A.\n\n\/\/ Creating two thread objects and pass reference variable obj as parameter to Thread1 and Thread2.\nThread1 t1 = new Thread1(obj);\nThread2 t2 = new Thread2(obj);\n\/\/ Run both threads.\n  t1.start();\n  t2.start();\n }\n}<\/code><\/pre>\n\n\n\n<h5 class=\"wp-block-heading\">Output<\/h5>\n\n\n\n<pre class=\"wp-block-code\"><code>   Data Delivered: 1\n      Data Received: 1\n      Data Delivered: 2\n      Data Received: 2\n      Data Delivered: 3\n      Data Received: 3\n      Data Delivered: 4\n      Data Received: 4\n      Data Delivered: 5\n      Data Received: 5<\/code><\/pre>\n\n\n\n<ol class=\"wp-block-list\"><li>The wait() and notify() methods are called inside the deliver() and receive() methods in this example program. Both approaches give Thread1 the ability to alert Thread2 after producing data and wait until Thread2 has finished utilizing.<\/li><li>Similarly, Thread2 notifies Thread1 after using data and then waits until Thread1 creates and delivers the subsequent data. As a result, the output is synchronized.<\/li><li>If the flag is set to true, Thread2 uses the data that Thread1 provided. While Thread1 is busy producing data, Thread2 periodically checks to see if the flag is true.<\/li><\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">In the event that the flag reads false, Thread2 will wait for the object until it is notified by a notify() method.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">When the data production is finished, Thread1 will immediately notify Thread2 that data is available for receipt. Thread1 and Thread2 effectively communicate with one another in this way.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>Note: also read about<\/em>\u00a0the\u00a0<a href=\"https:\/\/coderzpy.com\/synchronization-in-java\/\">Synchronization in Java<\/a><\/p>\n\n\n\n<h5 class=\"wp-block-heading\"><strong>Follow Me<\/strong><\/h5>\n\n\n\n<p class=\"wp-block-paragraph\">If you like my post, please follow me to read my latest post on programming and technology.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/www.instagram.com\/coderz.py\/\">https:\/\/www.instagram.com\/coderz.py\/<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/www.facebook.com\/coderz.py\">https:\/\/www.facebook.com\/coderz.py<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>What is Inter-thread Communication? Java has a mechanism called inter-thread communication that allows another thread to enter (or lock) a &#8230;<\/p>\n","protected":false},"author":3,"featured_media":1549,"menu_order":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[61],"tags":[163,142,164,144],"class_list":["post-1663","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-java","tag-inter-thread-communication","tag-multithreading","tag-polling","tag-thread"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.1.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"What is Inter-thread Communication? Java has a mechanism called inter-thread communication that allows another thread to enter (or lock) a paused thread&#039;s critical section so that it can be executed. What is polling, and what are its drawbacks? Polling is the process of repeatedly testing a condition until it holds true. Loops are frequently used\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Rabecca Fatima\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/coderzpy.com\/java\/inter-thread-communication-in-java\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.1.1\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"coderz.py - Keep Coding Keep Cheering!\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Inter-thread Communication in Java - coderz.py\" \/>\n\t\t<meta property=\"og:description\" content=\"What is Inter-thread Communication? Java has a mechanism called inter-thread communication that allows another thread to enter (or lock) a paused thread&#039;s critical section so that it can be executed. What is polling, and what are its drawbacks? Polling is the process of repeatedly testing a condition until it holds true. Loops are frequently used\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/coderzpy.com\/java\/inter-thread-communication-in-java\/\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2022-07-09T10:47:01+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2022-07-09T10:47:03+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Inter-thread Communication in Java - coderz.py\" \/>\n\t\t<meta name=\"twitter:description\" content=\"What is Inter-thread Communication? Java has a mechanism called inter-thread communication that allows another thread to enter (or lock) a paused thread&#039;s critical section so that it can be executed. What is polling, and what are its drawbacks? Polling is the process of repeatedly testing a condition until it holds true. Loops are frequently used\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"BlogPosting\",\"@id\":\"https:\\\/\\\/coderzpy.com\\\/java\\\/inter-thread-communication-in-java\\\/#blogposting\",\"name\":\"Inter-thread Communication in Java - coderz.py\",\"headline\":\"Inter-thread Communication in Java\",\"author\":{\"@id\":\"https:\\\/\\\/coderzpy.com\\\/author\\\/rabecca\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/coderzpy.com\\\/#organization\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/coderzpy.com\\\/wp-content\\\/uploads\\\/2022\\\/05\\\/85390-java-language-text-programming-logo-programmer.png\",\"width\":651,\"height\":400,\"caption\":\"java thread class\"},\"datePublished\":\"2022-07-09T16:17:01+05:30\",\"dateModified\":\"2022-07-09T16:17:03+05:30\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/coderzpy.com\\\/java\\\/inter-thread-communication-in-java\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/coderzpy.com\\\/java\\\/inter-thread-communication-in-java\\\/#webpage\"},\"articleSection\":\"Java, Inter-thread Communication, multithreading, polling, thread\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/coderzpy.com\\\/java\\\/inter-thread-communication-in-java\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/coderzpy.com#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/coderzpy.com\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/coderzpy.com\\\/course\\\/java\\\/#listItem\",\"name\":\"Java\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/coderzpy.com\\\/course\\\/java\\\/#listItem\",\"position\":2,\"name\":\"Java\",\"item\":\"https:\\\/\\\/coderzpy.com\\\/course\\\/java\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/coderzpy.com\\\/java\\\/inter-thread-communication-in-java\\\/#listItem\",\"name\":\"Inter-thread Communication in Java\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/coderzpy.com#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/coderzpy.com\\\/java\\\/inter-thread-communication-in-java\\\/#listItem\",\"position\":3,\"name\":\"Inter-thread Communication in Java\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/coderzpy.com\\\/course\\\/java\\\/#listItem\",\"name\":\"Java\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/coderzpy.com\\\/#organization\",\"name\":\"coderz.py\",\"description\":\"Keep Coding Keep Cheering!\",\"url\":\"https:\\\/\\\/coderzpy.com\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/coderzpy.com\\\/author\\\/rabecca\\\/#author\",\"url\":\"https:\\\/\\\/coderzpy.com\\\/author\\\/rabecca\\\/\",\"name\":\"Rabecca Fatima\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/coderzpy.com\\\/java\\\/inter-thread-communication-in-java\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/209225ca96598bab25f758a45345c5082dc77605dc36a7caeb0a66b601be2860?s=96&d=identicon&r=g\",\"width\":96,\"height\":96,\"caption\":\"Rabecca Fatima\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/coderzpy.com\\\/java\\\/inter-thread-communication-in-java\\\/#webpage\",\"url\":\"https:\\\/\\\/coderzpy.com\\\/java\\\/inter-thread-communication-in-java\\\/\",\"name\":\"Inter-thread Communication in Java - coderz.py\",\"description\":\"What is Inter-thread Communication? Java has a mechanism called inter-thread communication that allows another thread to enter (or lock) a paused thread's critical section so that it can be executed. What is polling, and what are its drawbacks? Polling is the process of repeatedly testing a condition until it holds true. Loops are frequently used\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/coderzpy.com\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/coderzpy.com\\\/java\\\/inter-thread-communication-in-java\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/coderzpy.com\\\/author\\\/rabecca\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/coderzpy.com\\\/author\\\/rabecca\\\/#author\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/coderzpy.com\\\/wp-content\\\/uploads\\\/2022\\\/05\\\/85390-java-language-text-programming-logo-programmer.png\",\"@id\":\"https:\\\/\\\/coderzpy.com\\\/java\\\/inter-thread-communication-in-java\\\/#mainImage\",\"width\":651,\"height\":400,\"caption\":\"java thread class\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/coderzpy.com\\\/java\\\/inter-thread-communication-in-java\\\/#mainImage\"},\"datePublished\":\"2022-07-09T16:17:01+05:30\",\"dateModified\":\"2022-07-09T16:17:03+05:30\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/coderzpy.com\\\/#website\",\"url\":\"https:\\\/\\\/coderzpy.com\\\/\",\"name\":\"coderz.py\",\"description\":\"Keep Coding Keep Cheering!\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/coderzpy.com\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Inter-thread Communication in Java - coderz.py","description":"What is Inter-thread Communication? Java has a mechanism called inter-thread communication that allows another thread to enter (or lock) a paused thread's critical section so that it can be executed. What is polling, and what are its drawbacks? Polling is the process of repeatedly testing a condition until it holds true. Loops are frequently used","canonical_url":"https:\/\/coderzpy.com\/java\/inter-thread-communication-in-java\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"BlogPosting","@id":"https:\/\/coderzpy.com\/java\/inter-thread-communication-in-java\/#blogposting","name":"Inter-thread Communication in Java - coderz.py","headline":"Inter-thread Communication in Java","author":{"@id":"https:\/\/coderzpy.com\/author\/rabecca\/#author"},"publisher":{"@id":"https:\/\/coderzpy.com\/#organization"},"image":{"@type":"ImageObject","url":"https:\/\/coderzpy.com\/wp-content\/uploads\/2022\/05\/85390-java-language-text-programming-logo-programmer.png","width":651,"height":400,"caption":"java thread class"},"datePublished":"2022-07-09T16:17:01+05:30","dateModified":"2022-07-09T16:17:03+05:30","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/coderzpy.com\/java\/inter-thread-communication-in-java\/#webpage"},"isPartOf":{"@id":"https:\/\/coderzpy.com\/java\/inter-thread-communication-in-java\/#webpage"},"articleSection":"Java, Inter-thread Communication, multithreading, polling, thread"},{"@type":"BreadcrumbList","@id":"https:\/\/coderzpy.com\/java\/inter-thread-communication-in-java\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/coderzpy.com#listItem","position":1,"name":"Home","item":"https:\/\/coderzpy.com","nextItem":{"@type":"ListItem","@id":"https:\/\/coderzpy.com\/course\/java\/#listItem","name":"Java"}},{"@type":"ListItem","@id":"https:\/\/coderzpy.com\/course\/java\/#listItem","position":2,"name":"Java","item":"https:\/\/coderzpy.com\/course\/java\/","nextItem":{"@type":"ListItem","@id":"https:\/\/coderzpy.com\/java\/inter-thread-communication-in-java\/#listItem","name":"Inter-thread Communication in Java"},"previousItem":{"@type":"ListItem","@id":"https:\/\/coderzpy.com#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/coderzpy.com\/java\/inter-thread-communication-in-java\/#listItem","position":3,"name":"Inter-thread Communication in Java","previousItem":{"@type":"ListItem","@id":"https:\/\/coderzpy.com\/course\/java\/#listItem","name":"Java"}}]},{"@type":"Organization","@id":"https:\/\/coderzpy.com\/#organization","name":"coderz.py","description":"Keep Coding Keep Cheering!","url":"https:\/\/coderzpy.com\/"},{"@type":"Person","@id":"https:\/\/coderzpy.com\/author\/rabecca\/#author","url":"https:\/\/coderzpy.com\/author\/rabecca\/","name":"Rabecca Fatima","image":{"@type":"ImageObject","@id":"https:\/\/coderzpy.com\/java\/inter-thread-communication-in-java\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/209225ca96598bab25f758a45345c5082dc77605dc36a7caeb0a66b601be2860?s=96&d=identicon&r=g","width":96,"height":96,"caption":"Rabecca Fatima"}},{"@type":"WebPage","@id":"https:\/\/coderzpy.com\/java\/inter-thread-communication-in-java\/#webpage","url":"https:\/\/coderzpy.com\/java\/inter-thread-communication-in-java\/","name":"Inter-thread Communication in Java - coderz.py","description":"What is Inter-thread Communication? Java has a mechanism called inter-thread communication that allows another thread to enter (or lock) a paused thread's critical section so that it can be executed. What is polling, and what are its drawbacks? Polling is the process of repeatedly testing a condition until it holds true. Loops are frequently used","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/coderzpy.com\/#website"},"breadcrumb":{"@id":"https:\/\/coderzpy.com\/java\/inter-thread-communication-in-java\/#breadcrumblist"},"author":{"@id":"https:\/\/coderzpy.com\/author\/rabecca\/#author"},"creator":{"@id":"https:\/\/coderzpy.com\/author\/rabecca\/#author"},"image":{"@type":"ImageObject","url":"https:\/\/coderzpy.com\/wp-content\/uploads\/2022\/05\/85390-java-language-text-programming-logo-programmer.png","@id":"https:\/\/coderzpy.com\/java\/inter-thread-communication-in-java\/#mainImage","width":651,"height":400,"caption":"java thread class"},"primaryImageOfPage":{"@id":"https:\/\/coderzpy.com\/java\/inter-thread-communication-in-java\/#mainImage"},"datePublished":"2022-07-09T16:17:01+05:30","dateModified":"2022-07-09T16:17:03+05:30"},{"@type":"WebSite","@id":"https:\/\/coderzpy.com\/#website","url":"https:\/\/coderzpy.com\/","name":"coderz.py","description":"Keep Coding Keep Cheering!","inLanguage":"en-US","publisher":{"@id":"https:\/\/coderzpy.com\/#organization"}}]},"og:locale":"en_US","og:site_name":"coderz.py - Keep Coding Keep Cheering!","og:type":"article","og:title":"Inter-thread Communication in Java - coderz.py","og:description":"What is Inter-thread Communication? Java has a mechanism called inter-thread communication that allows another thread to enter (or lock) a paused thread's critical section so that it can be executed. What is polling, and what are its drawbacks? Polling is the process of repeatedly testing a condition until it holds true. Loops are frequently used","og:url":"https:\/\/coderzpy.com\/java\/inter-thread-communication-in-java\/","article:published_time":"2022-07-09T10:47:01+00:00","article:modified_time":"2022-07-09T10:47:03+00:00","twitter:card":"summary_large_image","twitter:title":"Inter-thread Communication in Java - coderz.py","twitter:description":"What is Inter-thread Communication? Java has a mechanism called inter-thread communication that allows another thread to enter (or lock) a paused thread's critical section so that it can be executed. What is polling, and what are its drawbacks? Polling is the process of repeatedly testing a condition until it holds true. Loops are frequently used"},"aioseo_meta_data":{"post_id":"1663","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"limit_modified_date":false,"created":"2024-12-30 12:20:33","updated":"2024-12-30 12:20:33","focus_keyword":null,"additional_keywords":null,"truseo_locale":null,"ai":null,"breadcrumb_settings":null,"seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/coderzpy.com\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/coderzpy.com\/course\/java\/\" title=\"Java\">Java<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tInter-thread Communication in Java\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/coderzpy.com"},{"label":"Java","link":"https:\/\/coderzpy.com\/course\/java\/"},{"label":"Inter-thread Communication in Java","link":"https:\/\/coderzpy.com\/java\/inter-thread-communication-in-java\/"}],"_links":{"self":[{"href":"https:\/\/coderzpy.com\/wp-json\/wp\/v2\/posts\/1663","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/coderzpy.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/coderzpy.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/coderzpy.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/coderzpy.com\/wp-json\/wp\/v2\/comments?post=1663"}],"version-history":[{"count":1,"href":"https:\/\/coderzpy.com\/wp-json\/wp\/v2\/posts\/1663\/revisions"}],"predecessor-version":[{"id":1664,"href":"https:\/\/coderzpy.com\/wp-json\/wp\/v2\/posts\/1663\/revisions\/1664"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/coderzpy.com\/wp-json\/wp\/v2\/media\/1549"}],"wp:attachment":[{"href":"https:\/\/coderzpy.com\/wp-json\/wp\/v2\/media?parent=1663"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/coderzpy.com\/wp-json\/wp\/v2\/categories?post=1663"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/coderzpy.com\/wp-json\/wp\/v2\/tags?post=1663"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}