{"id":1319,"date":"2023-06-27T13:54:26","date_gmt":"2023-06-27T05:54:26","guid":{"rendered":"https:\/\/xinchewhd.com.cn\/?p=1319"},"modified":"2023-06-27T13:54:26","modified_gmt":"2023-06-27T05:54:26","slug":"%e9%9d%a2%e8%af%95%e5%ae%98-%e6%9c%89%e4%ba%86%e8%a7%a3%e8%bf%87cas%e5%92%8c%e5%8e%9f%e5%ad%90%e6%93%8d%e4%bd%9c%e5%90%97%ef%bc%9f%e8%af%b4%e8%af%b4%e7%9c%8b","status":"publish","type":"post","link":"https:\/\/xinchewhd.com.cn\/index.php\/java\/%e9%9d%a2%e8%af%95%e5%ae%98-%e6%9c%89%e4%ba%86%e8%a7%a3%e8%bf%87cas%e5%92%8c%e5%8e%9f%e5%ad%90%e6%93%8d%e4%bd%9c%e5%90%97%ef%bc%9f%e8%af%b4%e8%af%b4%e7%9c%8b\/","title":{"rendered":"\u9762\u8bd5\u5b98: \u6709\u4e86\u89e3\u8fc7CAS\u548c\u539f\u5b50\u64cd\u4f5c\u5417\uff1f\u8bf4\u8bf4\u770b"},"content":{"rendered":"<div class='wxsyncmain'>\n<section data-tool=\"mdnice\u7f16\u8f91\u5668\" data-website=\"https:\/\/www.mdnice.com\" style=\"font-size: 16px;color: black;padding: 0 10px;word-spacing: 0px;word-break: break-word;word-wrap: break-word;text-align: left;line-height: 1.25;letter-spacing: 2px;background-image: linear-gradient(90deg, rgba(50, 0, 0, 0.05) 3%, rgba(0, 0, 0, 0) 3%), linear-gradient(360deg, rgba(50, 0, 0, 0.05) 3%, rgba(0, 0, 0, 0) 3%);background-size: 20px 20px;background-position: center center;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#39;PingFang SC&#39;, Cambria, Cochin, Georgia, Times, &#39;Times New Roman&#39;, serif;\">\n<h1 data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 30px;margin-bottom: 15px;padding: 0px;font-weight: bold;color: black;font-size: 25px;\"><span style=\"display: none;\"><\/span><span style=\"display: inline-block;font-weight: bold;color: #773098;\">\u9762\u8bd5\u5b98: \u6709\u4e86\u89e3\u8fc7CAS\u548c\u539f\u5b50\u64cd\u4f5c\u5417\uff1f\u8bf4\u8bf4\u770b<\/span><span><\/span><\/h1>\n<h2 data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 30px;margin-bottom: 15px;padding: 0px;font-weight: bold;color: black;font-size: 22px;text-align: left;margin: 20px 10px 0px 0px;\"><span style=\"display: none;\"><\/span><span style=\"font-size: 18px;font-weight: bold;display: inline-block;padding-left: 10px;border-left: 5px solid #916dd5;\">\u524d\u8a00<\/span><span><\/span><\/h2>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;margin: 10px 0px;letter-spacing: 2px;font-size: 14px;word-spacing: 2px;\">\u76ee\u524d\u6b63\u5728\u51fa\u4e00\u4e2a<code style=\"font-size: 14px;word-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: #916dd5;font-weight: bolder;background: none;\">Java\u591a\u7ebf\u7a0b\u4e13\u9898<\/code>\u957f\u671f\u7cfb\u5217\u6559\u7a0b\uff0c\u4ece\u5165\u95e8\u5230\u8fdb\u9636\u542b<code style=\"font-size: 14px;word-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: #916dd5;font-weight: bolder;background: none;\">\u6e90\u7801\u89e3\u8bfb<\/code>, \u7bc7\u5e45\u4f1a\u8f83\u591a, \u559c\u6b22\u7684\u8bdd\uff0c\u7ed9\u4e2a\u5173\u6ce8\u2764\ufe0f ~<\/p>\n<section class=\"mp_profile_iframe_wrp\"><mpprofile class=\"js_uneditable custom_select_card mp_profile_iframe\" data-pluginname=\"mpprofile\" data-id=\"MzU4NDcxOTM3OQ==\" data-headimg=\"http:\/\/mmbiz.qpic.cn\/mmbiz_png\/dDva6rRBQ2CdNqsbX0ZOtVheUHGoTtib0icQ7L0cw9gRuTRGBLBN8vicep6dA8aLicWomyRCSTIZQx51icvaYhg6EHg\/0?wx_fmt=png\" data-nickname=\"\u7a0b\u5e8f\u5458\u76ae\u5361\u79cb\" data-alias=\"weqdnj\" data-signature=\"\u5206\u4eab\u66f4\u591a\u597d\u73a9\u6709\u8da3\u7684\u7f16\u7a0b\u77e5\u8bc6~\" data-from=\"0\"><\/mpprofile><\/section>\n<h2 data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 30px;margin-bottom: 15px;padding: 0px;font-weight: bold;color: black;font-size: 22px;text-align: left;margin: 20px 10px 0px 0px;\"><span style=\"font-size: 18px;font-weight: bold;display: inline-block;padding-left: 10px;border-left: 5px solid #916dd5;\">\u4e50\u89c2\u9501 &amp; \u60b2\u89c2\u9501<\/span><span><\/span><\/h2>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;margin: 10px 0px;letter-spacing: 2px;font-size: 14px;word-spacing: 2px;\">\u5728\u6b63\u5f0f\u8bb2\u89e3\u4e4b\u524d\uff0c\u6211\u4eec\u5148\u4e86\u89e3\u4e00\u4e0b\u8fd9\u4e24\u4e2a\u6982\u5ff5<\/p>\n<h3 data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 30px;margin-bottom: 15px;padding: 0px;color: black;font-size: 16px;font-weight: bold;text-align: center;\"><span style=\"display: none;\"><\/span><span style=\"border-bottom: 2px solid #d89cf6;\">\u60b2\u89c2\u9501<\/span><span style=\"display: none;\"><\/span><\/h3>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;margin: 10px 0px;letter-spacing: 2px;font-size: 14px;word-spacing: 2px;\">\u987e\u540d\u601d\u4e49\uff0c\u5047\u4f7f\u60c5\u51b5\u662f\u6700\u7cdf\u7cd5\u7684\uff0c\u5728\u7a0b\u5e8f\u4e2d\u7684\u4f53\u73b0\u5c31\u662f\u5bf9\u8d44\u6e90\u7684\u62a2\u593a\u3002\u5bf9\u4e8e\u60b2\u89c2\u9501\u6765\u8bf4\uff0c\u5b83\u603b\u662f\u8ba4\u4e3a\u6bcf\u6b21\u8bbf\u95ee\u5171\u4eab\u8d44\u6e90\u65f6\u4f1a\u53d1\u751f\u51b2\u7a81\uff0c\u6240\u4ee5\u5fc5\u987b\u5bf9\u6bcf\u6b21\u6570\u636e\u64cd\u4f5c\u52a0\u4e0a\u9501\uff0c\u4ee5\u4fdd\u8bc1\u4e34\u754c\u533a\u7684\u7a0b\u5e8f\u540c\u4e00\u65f6\u95f4\u53ea\u80fd\u6709\u4e00\u4e2a\u7ebf\u7a0b\u5728\u6267\u884c\u3002<\/p>\n<h3 data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 30px;margin-bottom: 15px;padding: 0px;color: black;font-size: 16px;font-weight: bold;text-align: center;\"><span style=\"display: none;\"><\/span><span style=\"border-bottom: 2px solid #d89cf6;\">\u4e50\u89c2\u9501<\/span><span style=\"display: none;\"><\/span><\/h3>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;margin: 10px 0px;letter-spacing: 2px;font-size: 14px;word-spacing: 2px;\">\u4e0e\u5176\u76f8\u53cd\uff0c\u4e50\u89c2\u9501\u603b\u662f\u5047\u8bbe\u5bf9\u5171\u4eab\u8d44\u6e90\u7684\u8bbf\u95ee\u6ca1\u6709\u51b2\u7a81\uff0c\u7ebf\u7a0b\u53ef\u4ee5\u4e0d\u505c\u5730\u6267\u884c\uff0c\u65e0\u9700\u52a0\u9501\u4e5f\u65e0\u9700\u7b49\u5f85\u3002\u800c\u4e00\u65e6\u591a\u4e2a\u7ebf\u7a0b\u53d1\u751f\u51b2\u7a81\uff0c\u4e50\u89c2\u9501\u901a\u5e38\u662f\u4f7f\u7528\u4e00\u79cd\u79f0\u4e3a<code style=\"font-size: 14px;word-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: #916dd5;font-weight: bolder;background: none;\">CAS<\/code>\u7684\u6280\u672f\u6765\u4fdd\u8bc1\u7ebf\u7a0b\u6267\u884c\u7684\u5b89\u5168\u6027\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;margin: 10px 0px;letter-spacing: 2px;font-size: 14px;word-spacing: 2px;\">\u56e0\u4e3a\u6ca1\u6709\u9501\uff0c\u6240\u4ee5\u5c31\u4e0d\u5b58\u5728<code style=\"font-size: 14px;word-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: #916dd5;font-weight: bolder;background: none;\">\u6b7b\u9501<\/code>\u7684\u60c5\u51b5\u3002\u5927\u5bb6\u4e0d\u4eff\u8bd5\u60f3\u4e00\u4e0b\uff0c\u4ed6\u4eec\u5206\u522b\u9002\u5408\u4ec0\u4e48\u6837\u7684<code style=\"font-size: 14px;word-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: #916dd5;font-weight: bolder;background: none;\">\u573a\u666f<\/code><\/p>\n<ul data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: black;font-size: 15px;list-style-type: circle;\" class=\"list-paddingleft-1\">\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);font-size: 14px;font-weight: normal;\">\n<p style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;margin: 10px 0px;letter-spacing: 2px;font-size: 14px;word-spacing: 2px;\">\u4e50\u89c2\u9501\u591a\u7528\u4e8e<code style=\"font-size: 14px;word-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: #916dd5;font-weight: bolder;background: none;\">\u8bfb\u591a\u5199\u5c11<\/code>\u7684\u73af\u5883\uff0c\u907f\u514d\u9891\u7e41\u52a0\u9501\u5f71\u54cd\u6027\u80fd<\/p>\n<\/section>\n<\/li>\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);font-size: 14px;font-weight: normal;\">\n<p style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;margin: 10px 0px;letter-spacing: 2px;font-size: 14px;word-spacing: 2px;\">\u60b2\u89c2\u9501\u591a\u7528\u4e8e<code style=\"font-size: 14px;word-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: #916dd5;font-weight: bolder;background: none;\">\u5199\u591a\u8bfb\u5c11<\/code>\u7684\u73af\u5883\uff0c\u907f\u514d\u9891\u7e41\u5931\u8d25\u548c\u91cd\u8bd5\u5f71\u54cd\u6027\u80fd<\/p>\n<\/section>\n<\/li>\n<\/ul>\n<h2 data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 30px;margin-bottom: 15px;padding: 0px;font-weight: bold;color: black;font-size: 22px;text-align: left;margin: 20px 10px 0px 0px;\"><span style=\"display: none;\"><\/span><span style=\"font-size: 18px;font-weight: bold;display: inline-block;padding-left: 10px;border-left: 5px solid #916dd5;\">CAS<\/span><span><\/span><\/h2>\n<h3 data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 30px;margin-bottom: 15px;padding: 0px;color: black;font-size: 16px;font-weight: bold;text-align: center;\"><span style=\"display: none;\"><\/span><span style=\"border-bottom: 2px solid #d89cf6;\">\u6982\u8ff0<\/span><span style=\"display: none;\"><\/span><\/h3>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;margin: 10px 0px;letter-spacing: 2px;font-size: 14px;word-spacing: 2px;\">CAS\u7684\u5168\u79f0\u662f\uff1a\u6bd4\u8f83\u5e76\u4ea4\u6362\uff08Compare And Swap\uff09\u3002\u5728CAS\u4e2d\uff0c\u6709\u8fd9\u6837\u4e09\u4e2a\u503c<\/p>\n<ul data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: black;font-size: 15px;list-style-type: circle;\" class=\"list-paddingleft-1\">\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);font-size: 14px;font-weight: normal;\">V\uff1a\u8981\u66f4\u65b0\u7684\u53d8\u91cf(var)<\/section>\n<\/li>\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);font-size: 14px;font-weight: normal;\">E\uff1a\u9884\u671f\u503c(expected) (\u4e5f\u79f0\u4e3a\u65e7\u503c)<\/section>\n<\/li>\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);font-size: 14px;font-weight: normal;\">N\uff1a\u65b0\u503c(new)<\/section>\n<\/li>\n<\/ul>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;margin: 10px 0px;letter-spacing: 2px;font-size: 14px;word-spacing: 2px;\">\u6709\u6ca1\u6709\u5f88\u719f\u6089\uff0c\u4e0a\u8282\u6211\u4eec\u8bb2\u6e90\u7801\u7684\u65f6\u5019\u6709\u63d0\u5230\u8fc7~ \u5927\u81f4\u8fc7\u7a0b\u5982\u4e0b:<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;margin: 10px 0px;letter-spacing: 2px;font-size: 14px;word-spacing: 2px;\">\u5224\u65ad<code style=\"font-size: 14px;word-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: #916dd5;font-weight: bolder;background: none;\">\u66f4\u65b0\u7684\u53d8\u91cf<\/code>\u662f\u5426\u7b49\u4e8e<code style=\"font-size: 14px;word-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: #916dd5;font-weight: bolder;background: none;\">\u9884\u671f\u503c<\/code>\uff0c\u5982\u679c\u7b49\u4e8e\uff0c\u5c06\u8be5\u503c\u8bbe\u7f6e\u4e3a<code style=\"font-size: 14px;word-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: #916dd5;font-weight: bolder;background: none;\">\u65b0\u7684\u503c<\/code>\uff1b\u5982\u679c\u4e0d\u7b49\uff0c\u8bf4\u660e\u5df2\u7ecf\u6709\u5176\u5b83\u7ebf\u7a0b\u66f4\u65b0\u4e86<code style=\"font-size: 14px;word-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: #916dd5;font-weight: bolder;background: none;\">\u53d8\u91cf<\/code>\uff0c\u5219\u5f53\u524d\u7ebf\u7a0b\u653e\u5f03\u66f4\u65b0\uff0c\u4ec0\u4e48\u90fd\u4e0d\u505a\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;margin: 10px 0px;letter-spacing: 2px;font-size: 14px;word-spacing: 2px;\">\u90a3\u4e48\u4f1a\u4e0d\u4f1a\u51fa\u73b0\u6211\u5373\u5c06\u8981\u66f4\u65b0\u7684\u503c\u88ab\u5176\u5b83\u7ebf\u7a0b\u66f4\u65b0\u4e86\u5462\u2753<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;margin: 10px 0px;letter-spacing: 2px;font-size: 14px;word-spacing: 2px;\">\u4e0d\u4f1a\u7684\uff0c\u539f\u56e0\u5728\u4e8eCAS\u662f\u4e00\u79cd\u539f\u5b50\u64cd\u4f5c\u3002<\/p>\n<h3 data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 30px;margin-bottom: 15px;padding: 0px;color: black;font-size: 16px;font-weight: bold;text-align: center;\"><span style=\"display: none;\"><\/span><span style=\"border-bottom: 2px solid #d89cf6;\">\u539f\u5b50\u64cd\u4f5c<\/span><span style=\"display: none;\"><\/span><\/h3>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;margin: 10px 0px;letter-spacing: 2px;font-size: 14px;word-spacing: 2px;\"><code style=\"font-size: 14px;word-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: #916dd5;font-weight: bolder;background: none;\">\u539f\u5b50\u64cd\u4f5c\uff08atomic operation\uff09<\/code>\u662f\u6307\u4e0d\u88ab\u7ebf\u7a0b\u8c03\u5ea6\u6253\u65ad\u7684\u64cd\u4f5c,\u901a\u5e38\u6709\u4e00\u7cfb\u5217\u64cd\u4f5c\u7ec4\u5408\u800c\u6210\uff0c\u8be5\u64cd\u4f5c\u5f00\u59cb\u5230\u6267\u884c\u7ed3\u675f\uff0c\u671f\u95f4\u4e0d\u4f1a\u6709\u4efb\u4f55\u7ebf\u7a0b\u5207\u6362\uff0c\u4ece\u800c\u4fdd\u8bc1\u4e86cpu\u8d44\u6e90\u4e0d\u4f1a\u88ab\u5176\u5b83\u7ebf\u7a0b\u4e89\u593a\u3002\u7b80\u5355\u7684\u6765\u8bf4\u8fd9\u79cd\u64cd\u4f5c\u4e0d\u4f1a\u4e2d\u65ad\uff0c\u8981\u4e48\u6210\u529f\uff0c\u8981\u4e48\u5931\u8d25\uff0c\u53ef\u4ee5\u4fdd\u8bc1\u7ebf\u7a0b\u7684\u5b89\u5168\u6027\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;margin: 10px 0px;letter-spacing: 2px;font-size: 14px;word-spacing: 2px;\"><strong style=\"color: #916dd5;font-weight: bold;\">\u300c\u5f53\u591a\u4e2a\u7ebf\u7a0b\u540c\u65f6\u4f7f\u7528CAS\u64cd\u4f5c\u4e00\u4e2a\u53d8\u91cf\u65f6\uff0c\u53ea\u6709\u4e00\u4e2a\u6210\u529f\u66f4\u65b0\uff0c\u5176\u4f59\u90fd\u5931\u8d25\uff0c\u4f46\u5931\u8d25\u7684\u7ebf\u7a0b\u5e76\u4e0d\u4f1a\u88ab\u6302\u8d77\uff0c\u4ec5\u662f\u88ab\u544a\u77e5\u5931\u8d25\uff0c\u5e76\u4e14\u5141\u8bb8\u518d\u6b21\u5c1d\u300d<\/strong><\/p>\n<h3 data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 30px;margin-bottom: 15px;padding: 0px;color: black;font-size: 16px;font-weight: bold;text-align: center;\"><span style=\"display: none;\"><\/span><span style=\"border-bottom: 2px solid #d89cf6;\">Java\u4e2d\u7684CAS\u64cd\u4f5c\u5177\u4f53\u5b9e\u73b0<\/span><span style=\"display: none;\"><\/span><\/h3>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;margin: 10px 0px;letter-spacing: 2px;font-size: 14px;word-spacing: 2px;\">\u5728Java\u4e2d\uff0c\u901a\u5e38\u4f7f\u7528<code style=\"font-size: 14px;word-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: #916dd5;font-weight: bolder;background: none;\">sun.misc.Unsafe<\/code>\u7c7b,\u8be5\u7c7b\u4e0b\u7684\u65b9\u6cd5\u90fd\u662f<code style=\"font-size: 14px;word-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: #916dd5;font-weight: bolder;background: none;\">native<\/code>\u65b9\u6cd5\uff0c\u6240\u4ee5Java\u672c\u8eab\u4e0d\u8d1f\u8d23\u5177\u4f53\u5b9e\u73b0\uff0c\u901a\u5e38\u7531\u5e95\u5c42\u7684<code style=\"font-size: 14px;word-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: #916dd5;font-weight: bolder;background: none;\">jvm,c,c++<\/code>\u6765\u5b9e\u73b0<\/p>\n<pre data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;\"><span style=\"display: block;background: url(&quot;https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528042034133.jpeg&quot;) 10px 10px \/ 40px no-repeat rgb(40, 44, 52);height: 30px;width: 100%;margin-bottom: -7px;border-radius: 5px;\"><\/span><code style=\"overflow-x: auto;padding: 16px;color: #abb2bf;display: -webkit-box;font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;font-size: 12px;-webkit-overflow-scrolling: touch;padding-top: 15px;background: #282c34;border-radius: 5px;\"><span style=\"line-height: 26px;\"><span style=\"color: #c678dd;line-height: 26px;\">public<\/span>&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">boolean<\/span>&nbsp;<span style=\"color: #61aeee;line-height: 26px;\">compareAndSet<\/span><span style=\"line-height: 26px;\">(V&nbsp;&nbsp;&nbsp;expectedReference,<br  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;V&nbsp;&nbsp;&nbsp;newReference,<br  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">int<\/span>&nbsp;expectedStamp,<br  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">int<\/span>&nbsp;newStamp)<\/span>&nbsp;<\/span>{<br  \/>&nbsp;&nbsp;&nbsp;&nbsp;Pair&lt;V&gt;&nbsp;current&nbsp;=&nbsp;pair;<br  \/>&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">return<\/span><br  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;expectedReference&nbsp;==&nbsp;current.reference&nbsp;&amp;&amp;<br  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;expectedStamp&nbsp;==&nbsp;current.stamp&nbsp;&amp;&amp;<br  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;((newReference&nbsp;==&nbsp;current.reference&nbsp;&amp;&amp;<br  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;newStamp&nbsp;==&nbsp;current.stamp)&nbsp;||<br  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;casPair(current,&nbsp;Pair.of(newReference,&nbsp;newStamp)));<br  \/>}<br  \/><\/code><\/pre>\n<h4 data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 30px;margin-bottom: 15px;padding: 0px;font-weight: bold;color: black;font-size: 18px;\"><span style=\"display: none;\"><\/span><span>\u5faa\u73af\u65f6\u95f4\u957f\u5f00\u9500\u5927<\/span><span style=\"display: none;\"><\/span><\/h4>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;margin: 10px 0px;letter-spacing: 2px;font-size: 14px;word-spacing: 2px;\">CAS\u591a\u4e0e\u81ea\u65cb\u7ed3\u5408\u3002\u5982\u679c\u81ea\u65cbCAS\u957f\u65f6\u95f4\u4e0d\u6210\u529f\uff0c\u4f1a\u5360\u7528\u5927\u91cf\u7684CPU\u8d44\u6e90\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;margin: 10px 0px;letter-spacing: 2px;font-size: 14px;word-spacing: 2px;\">\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7JVM\u652f\u6301\u5904\u7406\u5668\u63d0\u4f9b\u7684<strong style=\"color: #916dd5;font-weight: bold;\">\u300cpause\u6307\u4ee4\u300d<\/strong>, \u80fd\u8ba9\u81ea\u65cb\u5931\u8d25\u65f6cpu\u7761\u7720\u4e00\u5c0f\u6bb5\u65f6\u95f4\u518d\u7ee7\u7eed\u81ea\u65cb\uff0c\u4ece\u800c\u4f7f\u5f97\u8bfb\u64cd\u4f5c\u7684\u9891\u7387\u4f4e\u5f88\u591a<\/p>\n<h4 data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 30px;margin-bottom: 15px;padding: 0px;font-weight: bold;color: black;font-size: 18px;\"><span style=\"display: none;\"><\/span><span>\u53ea\u80fd\u4fdd\u8bc1\u4e00\u4e2a\u5171\u4eab\u53d8\u91cf\u7684\u539f\u5b50\u64cd\u4f5c<\/span><span style=\"display: none;\"><\/span><\/h4>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;margin: 10px 0px;letter-spacing: 2px;font-size: 14px;word-spacing: 2px;\">\u7ed9\u5927\u5bb6\u4ecb\u7ecd\u4e24\u79cd\u65b9\u5f0f:<\/p>\n<ul data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: black;font-size: 15px;list-style-type: circle;\" class=\"list-paddingleft-1\">\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);font-size: 14px;font-weight: normal;\">\n<p style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;margin: 10px 0px;letter-spacing: 2px;font-size: 14px;word-spacing: 2px;\">\u4f7f\u7528\u63d0\u4f9b\u7684<code style=\"font-size: 14px;word-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: #916dd5;font-weight: bolder;background: none;\">AtomicReference<\/code><\/p>\n<\/section>\n<\/li>\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);font-size: 14px;font-weight: normal;\">\n<p style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;margin: 10px 0px;letter-spacing: 2px;font-size: 14px;word-spacing: 2px;\">\u4f7f\u7528\u9501<\/p>\n<\/section>\n<\/li>\n<\/ul>\n<h2 data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 30px;margin-bottom: 15px;padding: 0px;font-weight: bold;color: black;font-size: 22px;text-align: left;margin: 20px 10px 0px 0px;\"><span style=\"display: none;\"><\/span><span style=\"font-size: 18px;font-weight: bold;display: inline-block;padding-left: 10px;border-left: 5px solid #916dd5;\">\u7ed3\u675f\u8bed<\/span><span><\/span><\/h2>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;margin: 10px 0px;letter-spacing: 2px;font-size: 14px;word-spacing: 2px;\">\u672c\u8282\u4e3b\u8981\u7ed9\u5927\u5bb6\u4ecb\u7ecd\u4e86<code style=\"font-size: 14px;word-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: #916dd5;font-weight: bolder;background: none;\">CAS\u548c\u539f\u5b50\u64cd\u4f5c<\/code>\uff0c\u6709\u4e9b\u90e8\u5206\u5927\u5bb6\u4e86\u89e3\u4e00\u4e0b\u5c31\u597d\u3002\u4e0b\u4e00\u8282\uff0c\u5e26\u5927\u5bb6\u5b66\u4e60<code style=\"font-size: 14px;word-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: #916dd5;font-weight: bolder;background: none;\">\u7ebf\u7a0b\u6c60<\/code>\u7684\u57fa\u672c\u4f7f\u7528 ~<\/p>\n<p><mp-miniprogram data-miniprogram-appid=\"wx7564a3163c01a921\" data-miniprogram-path=\"pages\/index\/index\" data-miniprogram-nickname=\"\u7a0b\u5e8f\u5458\u76ae\u5361\u79cb\" data-miniprogram-avatar=\"http:\/\/mmbiz.qpic.cn\/mmbiz_png\/4riatBnj7IX3cWJjxpZicYUQT06DRbhdPI4t1rw1Fc93NstHnXhf6t7OLvb8xdmkepzDgic02GNh5P1hnYNEdAibGQ\/640?wx_fmt=png&amp;wxfrom=200\" data-miniprogram-title=\"\u5f80\u671f\u6559\u7a0b \u5feb\u6765\u5b66\u4e60~\" data-miniprogram-imageurl=\"http:\/\/mmbiz.qpic.cn\/mmbiz_jpg\/dDva6rRBQ2BLUM5efagz6N8bJy9PQU7ic7Ark7ZrLMfERgYUOoq5V3m9icQXsRW1dmSO2ZKUsaRia8PdJyibMROJLg\/0?wx_fmt=jpeg\" data-miniprogram-type=\"card\" data-miniprogram-servicetype=\"0\"><\/mp-miniprogram><\/p>\n<h2 data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 30px;margin-bottom: 15px;padding: 0px;font-weight: bold;color: black;font-size: 22px;text-align: left;margin: 20px 10px 0px 0px;\"><span style=\"display: none;\"><\/span><span style=\"font-size: 18px;font-weight: bold;display: inline-block;padding-left: 10px;border-left: 5px solid #916dd5;\">\u5f80\u671f\u5185\u5bb9\u63a8\u8350<\/span><span><\/span><\/h2>\n<ul data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: black;font-size: 15px;list-style-type: circle;\" class=\"list-paddingleft-1\">\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);font-size: 14px;font-weight: normal;\">\n<p style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;margin: 10px 0px;letter-spacing: 2px;font-size: 14px;word-spacing: 2px;\"><a href=\"https:\/\/mp.weixin.qq.com\/s?__biz=MzU4NDcxOTM3OQ==&amp;mid=2247484405&amp;idx=1&amp;sn=a0f6306f9cf6d42513ceb405c27fb5c6&amp;scene=21#wechat_redirect\" style=\"text-decoration: none;word-wrap: break-word;color: #916dd5;font-weight: bolder;border-bottom: 1px solid #916dd5;\" data-linktype=\"2\" target=\"_blank\"  rel=\"nofollow\" >Java\u591a\u7ebf\u7a0b\u4e13\u9898\u4e4b\u7ebf\u7a0b\u4e0e\u8fdb\u7a0b\u6982\u8ff0<\/a><\/p>\n<\/section>\n<\/li>\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);font-size: 14px;font-weight: normal;\">\n<p style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;margin: 10px 0px;letter-spacing: 2px;font-size: 14px;word-spacing: 2px;\"><a href=\"https:\/\/mp.weixin.qq.com\/s?__biz=MzU4NDcxOTM3OQ==&amp;mid=2247484420&amp;idx=1&amp;sn=091f16799a39c3b0accb34508c74f502&amp;scene=21#wechat_redirect\" style=\"text-decoration: none;word-wrap: break-word;color: #916dd5;font-weight: bolder;border-bottom: 1px solid #916dd5;\" data-linktype=\"2\" target=\"_blank\"  rel=\"nofollow\" >Java\u591a\u7ebf\u7a0b\u4e13\u9898\u4e4b\u7ebf\u7a0b\u7c7b\u548c\u63a5\u53e3\u5165\u95e8<\/a><\/p>\n<\/section>\n<\/li>\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);font-size: 14px;font-weight: normal;\">\n<p style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;margin: 10px 0px;letter-spacing: 2px;font-size: 14px;word-spacing: 2px;\"><a href=\"https:\/\/mp.weixin.qq.com\/s?__biz=MzU4NDcxOTM3OQ==&amp;mid=2247484445&amp;idx=1&amp;sn=d52c414aa01d7228b9c56e6cbf51b383&amp;scene=21#wechat_redirect\" style=\"text-decoration: none;word-wrap: break-word;color: #916dd5;font-weight: bolder;border-bottom: 1px solid #916dd5;\" data-linktype=\"2\" target=\"_blank\"  rel=\"nofollow\" >Java\u591a\u7ebf\u7a0b\u4e13\u9898\u4e4b\u8fdb\u9636\u5b66\u4e60Thread(\u542b\u6e90\u7801\u5206\u6790)<\/a><\/p>\n<\/section>\n<\/li>\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);font-size: 14px;font-weight: normal;\">\n<p style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;margin: 10px 0px;letter-spacing: 2px;font-size: 14px;word-spacing: 2px;\"><a href=\"https:\/\/mp.weixin.qq.com\/s?__biz=MzU4NDcxOTM3OQ==&amp;mid=2247484481&amp;idx=1&amp;sn=71634dcc861d5352a7c484c8fda1813f&amp;scene=21#wechat_redirect\" style=\"text-decoration: none;word-wrap: break-word;color: #916dd5;font-weight: bolder;border-bottom: 1px solid #916dd5;\" data-linktype=\"2\" target=\"_blank\"  rel=\"nofollow\" >Java\u591a\u7ebf\u7a0b\u4e13\u9898\u4e4bCallable\u3001Future\u4e0eFutureTask(\u542b\u6e90\u7801\u5206\u6790)<\/a><\/p>\n<\/section>\n<\/li>\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);font-size: 14px;font-weight: normal;\">\n<p style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;margin: 10px 0px;letter-spacing: 2px;font-size: 14px;word-spacing: 2px;\"><a href=\"https:\/\/mp.weixin.qq.com\/s?__biz=MzU4NDcxOTM3OQ==&amp;mid=2247484502&amp;idx=1&amp;sn=278fd3b18af993245fe31e0846778d6d&amp;scene=21#wechat_redirect\" style=\"text-decoration: none;word-wrap: break-word;color: #916dd5;font-weight: bolder;border-bottom: 1px solid #916dd5;\" data-linktype=\"2\" target=\"_blank\"  rel=\"nofollow\" >\u9762\u8bd5\u5b98: \u6709\u4e86\u89e3\u8fc7\u7ebf\u7a0b\u7ec4\u548c\u7ebf\u7a0b\u4f18\u5148\u7ea7\u5417<\/a><\/p>\n<\/section>\n<\/li>\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);font-size: 14px;font-weight: normal;\">\n<p style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;margin: 10px 0px;letter-spacing: 2px;font-size: 14px;word-spacing: 2px;\"><a href=\"https:\/\/mp.weixin.qq.com\/s?__biz=MzU4NDcxOTM3OQ==&amp;mid=2247484525&amp;idx=1&amp;sn=02795b750487873becddb73fc6a4a4c5&amp;scene=21#wechat_redirect\" style=\"text-decoration: none;word-wrap: break-word;color: #916dd5;font-weight: bolder;border-bottom: 1px solid #916dd5;\" data-linktype=\"2\" target=\"_blank\"  rel=\"nofollow\" >\u9762\u8bd5\u5b98: \u8bf4\u4e00\u4e0b\u7ebf\u7a0b\u7684\u751f\u547d\u5468\u671f\u8fc7\u7a0b<\/a><\/p>\n<\/section>\n<\/li>\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);font-size: 14px;font-weight: normal;\">\n<p style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;margin: 10px 0px;letter-spacing: 2px;font-size: 14px;word-spacing: 2px;\"><a href=\"https:\/\/mp.weixin.qq.com\/s?__biz=MzU4NDcxOTM3OQ==&amp;mid=2247484564&amp;idx=1&amp;sn=e763cd00bfc7a170b9837c841b34afe6&amp;scene=21#wechat_redirect\" style=\"text-decoration: none;word-wrap: break-word;color: #916dd5;font-weight: bolder;border-bottom: 1px solid #916dd5;\" data-linktype=\"2\" target=\"_blank\"  rel=\"nofollow\" >\u9762\u8bd5\u5b98: \u8bf4\u4e00\u4e0b\u7ebf\u7a0b\u95f4\u7684\u901a\u4fe1<\/a><\/p>\n<\/section>\n<\/li>\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);font-size: 14px;font-weight: normal;\">\n<p style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;margin: 10px 0px;letter-spacing: 2px;font-size: 14px;word-spacing: 2px;\"><a href=\"https:\/\/mp.weixin.qq.com\/s?__biz=MzU4NDcxOTM3OQ==&amp;mid=2247484570&amp;idx=1&amp;sn=9ff4d1c83b96ff3f1145d2daf067b842&amp;scene=21#wechat_redirect\" style=\"text-decoration: none;word-wrap: break-word;color: #916dd5;font-weight: bolder;border-bottom: 1px solid #916dd5;\" data-linktype=\"2\" target=\"_blank\"  rel=\"nofollow\" >\u9762\u8bd5\u5b98: \u8bf4\u4e00\u4e0bJava\u7684\u5171\u4eab\u5185\u5b58\u6a21\u578b<\/a><\/p>\n<\/section>\n<\/li>\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);font-size: 14px;font-weight: normal;\">\n<p style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;margin: 10px 0px;letter-spacing: 2px;font-size: 14px;word-spacing: 2px;\"><a href=\"https:\/\/mp.weixin.qq.com\/s?__biz=MzU4NDcxOTM3OQ==&amp;mid=2247484576&amp;idx=1&amp;sn=ebec110c348f4ebfa8287e587e83c256&amp;scene=21#wechat_redirect\" style=\"text-decoration: none;word-wrap: break-word;color: #916dd5;font-weight: bolder;border-bottom: 1px solid #916dd5;\" data-linktype=\"2\" target=\"_blank\"  rel=\"nofollow\" >\u9762\u8bd5\u5b98: \u6709\u4e86\u89e3\u8fc7\u6307\u4ee4\u91cd\u6392\u5417\uff0c\u4ec0\u4e48\u662fhappens-before<\/a><\/p>\n<\/section>\n<\/li>\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);font-size: 14px;font-weight: normal;\">\n<p style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;margin: 10px 0px;letter-spacing: 2px;font-size: 14px;word-spacing: 2px;\"><a href=\"https:\/\/mp.weixin.qq.com\/s?__biz=MzU4NDcxOTM3OQ==&amp;mid=2247484590&amp;idx=1&amp;sn=c518647803181f8744f82db2c08158c7&amp;scene=21#wechat_redirect\" style=\"text-decoration: none;word-wrap: break-word;color: #916dd5;font-weight: bolder;border-bottom: 1px solid #916dd5;\" data-linktype=\"2\" target=\"_blank\"  rel=\"nofollow\" >\u9762\u8bd5\u5b98: \u6709\u4e86\u89e3\u8fc7volatile\u5173\u952e\u5b57\u5417 \u8bf4\u8bf4\u770b<\/a><\/p>\n<\/section>\n<\/li>\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);font-size: 14px;font-weight: normal;\">\n<p style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;margin: 10px 0px;letter-spacing: 2px;font-size: 14px;word-spacing: 2px;\"><a href=\"https:\/\/mp.weixin.qq.com\/s?__biz=MzU4NDcxOTM3OQ==&amp;mid=2247484604&amp;idx=1&amp;sn=6c972adc14605693f2849f0a714385e1&amp;scene=21#wechat_redirect\" style=\"text-decoration: none;word-wrap: break-word;color: #916dd5;font-weight: bolder;border-bottom: 1px solid #916dd5;\" data-linktype=\"2\" target=\"_blank\"  rel=\"nofollow\" >\u9762\u8bd5\u5b98: \u6709\u4e86\u89e3\u8fc7Synchronized\u5417 \u8bf4\u8bf4\u770b<\/a><\/p>\n<\/section>\n<\/li>\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);font-size: 14px;font-weight: normal;\">\n<p style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;margin: 10px 0px;letter-spacing: 2px;font-size: 14px;word-spacing: 2px;\"><a href=\"https:\/\/mp.weixin.qq.com\/s?__biz=MzU4NDcxOTM3OQ==&amp;mid=2247484617&amp;idx=1&amp;sn=46f4035948f6818895ddffc97493b068&amp;scene=21#wechat_redirect\" style=\"text-decoration: none;word-wrap: break-word;color: #916dd5;font-weight: bolder;border-bottom: 1px solid #916dd5;\" data-linktype=\"2\" target=\"_blank\"  rel=\"nofollow\" >Java\u591a\u7ebf\u7a0b\u4e13\u9898\u4e4bLock\u9501\u7684\u4f7f\u7528<\/a><\/p>\n<\/section>\n<\/li>\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);font-size: 14px;font-weight: normal;\">\n<p style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;margin: 10px 0px;letter-spacing: 2px;font-size: 14px;word-spacing: 2px;\"><a href=\"https:\/\/mp.weixin.qq.com\/s?__biz=MzU4NDcxOTM3OQ==&amp;mid=2247484666&amp;idx=1&amp;sn=4875ee063645c0b31fac566f2e1d8fa5&amp;scene=21#wechat_redirect\" style=\"text-decoration: none;word-wrap: break-word;color: #916dd5;font-weight: bolder;border-bottom: 1px solid #916dd5;\" data-linktype=\"2\" target=\"_blank\"  rel=\"nofollow\" >\u9762\u8bd5\u5b98: \u6709\u4e86\u89e3\u8fc7ReentrantLock\u7684\u5e95\u5c42\u5b9e\u73b0\u5417\uff1f\u8bf4\u8bf4\u770b<\/a><\/p>\n<\/section>\n<\/li>\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);font-size: 14px;font-weight: normal;\">\n<p style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;margin: 10px 0px;letter-spacing: 2px;font-size: 14px;word-spacing: 2px;\">\u6211\u7684\u535a\u5ba2(\u9605\u8bfb\u4f53\u9a8c\u8f83\u4f73)<\/p>\n<\/section>\n<\/li>\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);font-size: 14px;font-weight: normal;\">\n<p style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;margin: 10px 0px;letter-spacing: 2px;font-size: 14px;word-spacing: 2px;\"><a href=\"https:\/\/mp.weixin.qq.com\/s?__biz=MzU4NDcxOTM3OQ==&amp;mid=2247483838&amp;idx=1&amp;sn=71fb87986da0b055350486a0d5978738&amp;scene=21#wechat_redirect\" style=\"text-decoration: none;word-wrap: break-word;color: #916dd5;font-weight: bolder;border-bottom: 1px solid #916dd5;\" data-linktype=\"2\" target=\"_blank\"  rel=\"nofollow\" >\u5199\u7ed9\u521d\u5b66\u8005\u7684Java\u57fa\u7840\u6559\u7a0b<\/a><\/p>\n<\/section>\n<\/li>\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);font-size: 14px;font-weight: normal;\">\n<p style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;margin: 10px 0px;letter-spacing: 2px;font-size: 14px;word-spacing: 2px;\"><a href=\"https:\/\/mp.weixin.qq.com\/s?__biz=MzU4NDcxOTM3OQ==&amp;mid=2247483935&amp;idx=1&amp;sn=02e3a119ac67ec14acbbeafd90ea4d67&amp;scene=21#wechat_redirect\" style=\"text-decoration: none;word-wrap: break-word;color: #916dd5;font-weight: bolder;border-bottom: 1px solid #916dd5;\" data-linktype=\"2\" target=\"_blank\"  rel=\"nofollow\" >\u4e00\u6587\u5e26\u4f60\u5feb\u901f\u5b66\u4e60Java\u96c6\u5408\u7c7b<\/a><\/p>\n<\/section>\n<\/li>\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);font-size: 14px;font-weight: normal;\">\n<p style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;margin: 10px 0px;letter-spacing: 2px;font-size: 14px;word-spacing: 2px;\"><a href=\"https:\/\/mp.weixin.qq.com\/s?__biz=MzU4NDcxOTM3OQ==&amp;mid=2247483885&amp;idx=1&amp;sn=ddee16b53b26c9a143bcfcaa7c5b26d7&amp;scene=21#wechat_redirect\" style=\"text-decoration: none;word-wrap: break-word;color: #916dd5;font-weight: bolder;border-bottom: 1px solid #916dd5;\" data-linktype=\"2\" target=\"_blank\"  rel=\"nofollow\" >\u82b1\u51e0\u5206\u949f\u5feb\u901f\u4e86\u89e3\u4e00\u4e0b\u6cdb\u578b\u4e0e\u679a\u4e3e<\/a><\/p>\n<\/section>\n<\/li>\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);font-size: 14px;font-weight: normal;\">\n<p style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;margin: 10px 0px;letter-spacing: 2px;font-size: 14px;word-spacing: 2px;\"><a href=\"https:\/\/mp.weixin.qq.com\/s?__biz=MzU4NDcxOTM3OQ==&amp;mid=2247483865&amp;idx=1&amp;sn=bad9a6e8c874931cefe9a778d28acdd0&amp;scene=21#wechat_redirect\" style=\"text-decoration: none;word-wrap: break-word;color: #916dd5;font-weight: bolder;border-bottom: 1px solid #916dd5;\" data-linktype=\"2\" target=\"_blank\"  rel=\"nofollow\" >Java\u6ce8\u89e3\u4e0e\u53cd\u5c04\u5165\u95e8\u5230\u8fdb\u9636<\/a><\/p>\n<\/section>\n<\/li>\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);font-size: 14px;font-weight: normal;\">\n<p style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;margin: 10px 0px;letter-spacing: 2px;font-size: 14px;word-spacing: 2px;\"><a href=\"https:\/\/mp.weixin.qq.com\/s?__biz=MzU4NDcxOTM3OQ==&amp;mid=2247483965&amp;idx=1&amp;sn=b7a4e796f8a43c1790b030ceca35eaaf&amp;scene=21#wechat_redirect\" style=\"text-decoration: none;word-wrap: break-word;color: #916dd5;font-weight: bolder;border-bottom: 1px solid #916dd5;\" data-linktype=\"2\" target=\"_blank\"  rel=\"nofollow\" >JavaIO\u6559\u7a0b\u4ece\u5165\u95e8\u5230\u8fdb\u9636<\/a><\/p>\n<\/section>\n<\/li>\n<\/ul>\n<h2 data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 30px;margin-bottom: 15px;padding: 0px;font-weight: bold;color: black;font-size: 22px;text-align: left;margin: 20px 10px 0px 0px;\"><span style=\"display: none;\"><\/span><span style=\"font-size: 18px;font-weight: bold;display: inline-block;padding-left: 10px;border-left: 5px solid #916dd5;\">\u9879\u76ee\u6e90\u7801(\u6e90\u7801\u5df2\u66f4\u65b0 \u6b22\u8fcestar\u2b50\ufe0f)<\/span><span><\/span><\/h2>\n<ul data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: black;font-size: 15px;list-style-type: circle;\" class=\"list-paddingleft-1\">\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);font-size: 14px;font-weight: normal;\">\n<p style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;margin: 10px 0px;letter-spacing: 2px;font-size: 14px;word-spacing: 2px;\">java-thread-all<\/p>\n<\/section>\n<\/li>\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);font-size: 14px;font-weight: normal;\">\n<p style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;margin: 10px 0px;letter-spacing: 2px;font-size: 14px;word-spacing: 2px;\"><code style=\"font-size: 14px;word-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: #916dd5;font-weight: bolder;background: none;\">\u5730\u5740<\/code>: https:\/\/github.com\/qiuChengleiy\/java-thread-all.git<\/p>\n<\/section>\n<\/li>\n<\/ul>\n<h2 data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 30px;margin-bottom: 15px;padding: 0px;font-weight: bold;color: black;font-size: 22px;text-align: left;margin: 20px 10px 0px 0px;\"><span style=\"display: none;\"><\/span><span style=\"font-size: 18px;font-weight: bold;display: inline-block;padding-left: 10px;border-left: 5px solid #916dd5;\">\u63a8\u8350 SpringBoot &amp; SpringCloud (\u6e90\u7801\u5df2\u66f4\u65b0 \u6b22\u8fcestar\u2b50\ufe0f)<\/span><span><\/span><\/h2>\n<ul data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: black;font-size: 15px;list-style-type: circle;\" class=\"list-paddingleft-1\">\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);font-size: 14px;font-weight: normal;\">\n<p style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;margin: 10px 0px;letter-spacing: 2px;font-size: 14px;word-spacing: 2px;\">springboot-all<\/p>\n<\/section>\n<\/li>\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);font-size: 14px;font-weight: normal;\">\n<p style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;margin: 10px 0px;letter-spacing: 2px;font-size: 14px;word-spacing: 2px;\"><code style=\"font-size: 14px;word-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: #916dd5;font-weight: bolder;background: none;\">\u5730\u5740<\/code>: https:\/\/github.com\/qiuChengleiy\/springboot-all.git<\/p>\n<\/section>\n<\/li>\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);font-size: 14px;font-weight: normal;\">\n<p style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;margin: 10px 0px;letter-spacing: 2px;font-size: 14px;word-spacing: 2px;\"><a href=\"https:\/\/mp.weixin.qq.com\/s?__biz=MzU4NDcxOTM3OQ==&amp;mid=2247484270&amp;idx=1&amp;sn=7c99c89d9672effa90547f92815cb1b5&amp;scene=21#wechat_redirect\" style=\"text-decoration: none;word-wrap: break-word;color: #916dd5;font-weight: bolder;border-bottom: 1px solid #916dd5;\" data-linktype=\"2\" target=\"_blank\"  rel=\"nofollow\" >SpringBoot\u7cfb\u5217\u6559\u7a0b\u5408\u96c6<\/a><\/p>\n<\/section>\n<\/li>\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);font-size: 14px;font-weight: normal;\">\n<p style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;margin: 10px 0px;letter-spacing: 2px;font-size: 14px;word-spacing: 2px;\"><a href=\"https:\/\/mp.weixin.qq.com\/s?__biz=MzU4NDcxOTM3OQ==&amp;mid=2247484392&amp;idx=1&amp;sn=e6c7e1231c4cf6b9f4debbe3257aca8b&amp;scene=21#wechat_redirect\" style=\"text-decoration: none;word-wrap: break-word;color: #916dd5;font-weight: bolder;border-bottom: 1px solid #916dd5;\" data-linktype=\"2\" target=\"_blank\"  rel=\"nofollow\" >\u4e00\u8d77\u6765\u5b66SpringCloud\u5408\u96c6<\/a><\/p>\n<\/section>\n<\/li>\n<\/ul>\n<p style=\"text-align: center;margin-bottom: 0em;\"><img decoding=\"async\" class=\"rich_pages wxw-img lazyload\" data-galleryid=\"\" data-ratio=\"1.2792553191489362\" data-s=\"300,640\"  data-type=\"jpeg\" data-w=\"752\" style=\"\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528042033301.jpeg\" src=\"https:\/\/s.nmxc.ltd\/sakurairo_vision\/@2.6\/load_svg\/inload.svg\" onerror=\"imgError(this)\"><noscript><img decoding=\"async\" class=\"rich_pages wxw-img\" data-galleryid=\"\" data-ratio=\"1.2792553191489362\" data-s=\"300,640\"  data-type=\"jpeg\" data-w=\"752\" style=\"\" src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528042033301.jpeg\"><\/noscript><\/p>\n<p style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;margin: 10px 0px;letter-spacing: 2px;font-size: 14px;word-spacing: 2px;\"><a href=\"https:\/\/mp.weixin.qq.com\/s?__biz=MzU4NDcxOTM3OQ==&amp;mid=2247484392&amp;idx=1&amp;sn=e6c7e1231c4cf6b9f4debbe3257aca8b&amp;scene=21#wechat_redirect\" style=\"text-decoration: none;word-wrap: break-word;color: #916dd5;font-weight: bolder;border-bottom: 1px solid #916dd5;\" data-linktype=\"2\" target=\"_blank\"  rel=\"nofollow\" ><\/a><\/p>\n<\/section>\n<p><br  \/><\/p>\n<blockquote>\n<p>\u672c\u7bc7\u6587\u7ae0\u6765\u6e90\u4e8e\u5fae\u4fe1\u516c\u4f17\u53f7:                 \u7a0b\u5e8f\u5458\u76ae\u5361\u79cb              <\/p>\n<\/blockquote>\n<\/div>\n","raw":"","protected":false},"excerpt":{"rendered":"<p>\u9762\u8bd5\u5b98: \u6709\u4e86\u89e3\u8fc7CAS\u548c\u539f\u5b50\u64cd\u4f5c\u5417\uff1f\u8bf4\u8bf4\u770b \u524d\u8a00 \u76ee\u524d\u6b63\u5728\u51fa\u4e00\u4e2aJava\u591a\u7ebf\u7a0b\u4e13\u9898\u957f\u671f\u7cfb\u5217\u6559\u7a0b\uff0c\u4ece\u5165\u95e8\u5230\u8fdb\u9636\u542b\u6e90\u7801\u89e3\u8bfb, \u7bc7\u5e45\u4f1a &#8230;<\/p>\n","protected":false},"author":1,"featured_media":1316,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"emotion":"","emotion_color":"","title_style":"","license":"","footnotes":""},"categories":[2],"tags":[],"class_list":["post-1319","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-java"],"post_thumbnail_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528042032881-150x150.jpeg","content_first_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528042033301.jpeg","post_medium_image_300":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528042032881-300x128.jpeg","post_thumbnail_image_624":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528042032881.jpeg","post_frist_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528042033301.jpeg","post_medium_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528042032881-300x128.jpeg","post_large_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528042032881.jpeg","post_full_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528042032881.jpeg","post_all_images":[{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528042033301.jpeg","id":"image0"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528042033301.jpeg","id":"image1"}],"videoAdId":"","listAd":"0","listAdId":"","listAdEvery":6,"total_comments":0,"category_name":"Java","post_date":"2023-06-27","like_count":"0","praiseWord":"\u9f13\u52b1","copyright_state":"","excitationAd":"0","rewardedVideoAdId":"","detailAdId":"","detailAd":"0","enterpriseMinapp":"0","audios":[],"postImageUrl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230519082947553.jpg","avatarurls":[],"related_posts":null,"pageviews":335,"next_post_id":1284,"next_post_title":"\u9762\u8bd5\u5b98: \u6709\u4e86\u89e3\u8fc7volatile\u5173\u952e\u5b57\u5417 \u8bf4\u8bf4\u770b","previous_post_id":1371,"previous_post_title":"\u9762\u8bd5\u5b98: Stream\u5e76\u884c\u6d41\u6709\u4e86\u89e3\u8fc7\u5417\uff1f\u8bf4\u8bf4\u770b","_links":{"self":[{"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/posts\/1319","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/comments?post=1319"}],"version-history":[{"count":0,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/posts\/1319\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/media\/1316"}],"wp:attachment":[{"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/media?parent=1319"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/categories?post=1319"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/tags?post=1319"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}