{"id":5230,"date":"2024-08-01T22:49:30","date_gmt":"2024-08-01T14:49:30","guid":{"rendered":"https:\/\/xinchewhd.com.cn\/?p=5230"},"modified":"2024-08-01T22:49:30","modified_gmt":"2024-08-01T14:49:30","slug":"%e9%9d%a2%e8%af%95%e5%ae%98%ef%bc%9a%e5%a6%82%e4%bd%95%e6%ad%a3%e7%a1%ae%e7%9a%84%e5%81%9c%e6%8e%89%e7%ba%bf%e7%a8%8b%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/xinchewhd.com.cn\/index.php\/%e9%9d%a2%e8%af%95\/%e9%9d%a2%e8%af%95%e5%ae%98%ef%bc%9a%e5%a6%82%e4%bd%95%e6%ad%a3%e7%a1%ae%e7%9a%84%e5%81%9c%e6%8e%89%e7%ba%bf%e7%a8%8b%ef%bc%9f\/","title":{"rendered":"\u9762\u8bd5\u5b98\uff1a\u5982\u4f55\u6b63\u786e\u7684\u505c\u6389\u7ebf\u7a0b\uff1f"},"content":{"rendered":"<div class='wxsyncmain'>\n<pre style=\"margin-bottom: 0em;outline: 0px;max-width: 100%;color: rgb(34, 34, 34);letter-spacing: 0.544px;background-color: rgb(255, 255, 255);visibility: visible;box-sizing: border-box !important;overflow-wrap: break-word !important;\"><p style=\"outline: 0px;max-width: 100%;color: rgb(62, 62, 62);font-size: 15px;letter-spacing: 0.544px;white-space: normal;text-align: center;font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;visibility: visible;box-sizing: border-box !important;overflow-wrap: break-word !important;\"><span style=\"outline: 0px;max-width: 100%;font-size: 13px;visibility: visible;font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;box-sizing: border-box !important;overflow-wrap: break-word !important;\"><span style=\"font-size: 13px;outline: 0px;max-width: 100%;color: rgb(136, 136, 136);letter-spacing: 0.544px;visibility: visible;\">\u4e0a\u65b9\u84dd\u8272\u201c<\/span><span style=\"font-size: 13px;outline: 0px;max-width: 100%;letter-spacing: 0.544px;color: rgb(0, 128, 255);visibility: visible;\">\u7a0b\u5e8f\u5458\u8ffd\u98ce<\/span><span style=\"font-size: 13px;outline: 0px;max-width: 100%;color: rgb(136, 136, 136);letter-spacing: 0.544px;visibility: visible;\">\u201d\uff0c\u9009\u62e9\u201c\u8bbe\u4e3a\u661f\u6807\u201d<\/span><\/span><\/p><p style=\"outline: 0px;max-width: 100%;color: rgb(62, 62, 62);font-size: 15px;letter-spacing: 0.544px;white-space: normal;text-align: center;font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;visibility: visible;box-sizing: border-box !important;overflow-wrap: break-word !important;\"><span style=\"outline: 0px;max-width: 100%;font-size: 13px;letter-spacing: 0.544px;visibility: visible;font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;box-sizing: border-box !important;overflow-wrap: break-word !important;\"><span style=\"outline: 0px;max-width: 100%;color: rgb(136, 136, 136);letter-spacing: 0.544px;word-spacing: 2px;font-size: 16px;visibility: visible;\">\u56de\u590d\u201c<\/span><span style=\"outline: 0px;max-width: 100%;letter-spacing: 0.544px;word-spacing: 2px;font-size: 16px;color: rgb(255, 76, 65);visibility: visible;\"><strong style=\"outline: 0px;max-width: 100%;visibility: visible;box-sizing: border-box !important;overflow-wrap: break-word !important;\">\u8d44\u6599<\/strong><\/span><span style=\"outline: 0px;max-width: 100%;color: rgb(136, 136, 136);letter-spacing: 0.544px;word-spacing: 2px;font-size: 16px;visibility: visible;\">\u201d\u83b7\u53d6\u6574\u7406\u597d\u7684<\/span><strong mpa-from-tpl=\"t\" style=\"outline: 0px;max-width: 100%;color: rgb(63, 63, 63);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;letter-spacing: 0.544px;font-size: 15px;word-spacing: 2px;visibility: visible;box-sizing: border-box !important;overflow-wrap: break-word !important;\"><span style=\"outline: 0px;max-width: 100%;letter-spacing: 0.544px;font-size: 16px;color: rgb(255, 76, 65);visibility: visible;box-sizing: border-box !important;overflow-wrap: break-word !important;\">\u9762\u8bd5\u8d44\u6599<\/span><\/strong><\/span><\/p><p style=\"outline: 0px;max-width: 100%;letter-spacing: 0.544px;white-space: normal;visibility: visible;box-sizing: border-box !important;overflow-wrap: break-word !important;\"><\/p><p style=\"outline: 0px;max-width: 100%;letter-spacing: 0.544px;white-space: normal;visibility: visible;box-sizing: border-box !important;overflow-wrap: break-word !important;\"><span style=\"outline: 0px;max-width: 100%;letter-spacing: 0.544px;color: rgb(136, 136, 136);font-size: 14px;visibility: visible;font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;box-sizing: border-box !important;overflow-wrap: break-word !important;\">\u539f\u6587\uff1ablog.csdn.net\/weixin_29729247<\/span><\/p><p style=\"outline: 0px;max-width: 100%;letter-spacing: 0.544px;white-space: normal;visibility: visible;box-sizing: border-box !important;overflow-wrap: break-word !important;\"><span style=\"outline: 0px;max-width: 100%;letter-spacing: 0.544px;color: rgb(136, 136, 136);font-size: 14px;visibility: visible;font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;box-sizing: border-box !important;overflow-wrap: break-word !important;\"><\/span><\/p><\/pre>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;outline: 0px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &quot;PingFang SC&quot;, Cambria, Cochin, Georgia, Times, &quot;Times New Roman&quot;, serif;font-size: 16px;text-align: left;background-color: rgb(255, 255, 255);line-height: 26px;visibility: visible;\"><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">\u542f\u52a8\u7ebf\u7a0b\u9700\u8981\u8c03\u7528 Thread \u7c7b\u7684<\/span><code style=\"margin-right: 2px;margin-left: 2px;padding: 2px 4px;outline: 0px;font-size: 14px;border-radius: 4px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;visibility: visible;\"><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">start()<\/span><\/code><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">\u65b9\u6cd5\uff0c\u5e76\u5728<\/span><code style=\"margin-right: 2px;margin-left: 2px;padding: 2px 4px;outline: 0px;font-size: 14px;border-radius: 4px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;visibility: visible;\"><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">run()<\/span><\/code><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">\u65b9\u6cd5\u4e2d\u5b9a\u4e49\u9700\u8981\u6267\u884c\u7684\u4efb\u52a1\u3002\u542f\u52a8\u4e00\u4e2a\u7ebf\u7a0b\u975e\u5e38\u7b80\u5355\uff0c\u4f46\u5982\u679c\u60f3\u8981\u6b63\u786e\u505c\u6b62\u5b83\u5c31\u6ca1\u90a3\u4e48\u5bb9\u6613\u4e86\u3002<\/span><\/p>\n<h3 data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 30px;margin-bottom: 15px;outline: 0px;font-weight: bold;font-size: 20px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &quot;PingFang SC&quot;, Cambria, Cochin, Georgia, Times, &quot;Times New Roman&quot;, serif;text-align: left;background-color: rgb(255, 255, 255);visibility: visible;\"><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">\u4e3a\u4ec0\u4e48\u4e0d\u5f3a\u5236\u505c\u6b62<\/span><\/h3>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;outline: 0px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &quot;PingFang SC&quot;, Cambria, Cochin, Georgia, Times, &quot;Times New Roman&quot;, serif;font-size: 16px;text-align: left;background-color: rgb(255, 255, 255);line-height: 26px;visibility: visible;\"><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">\u5bf9\u4e8e Java \u800c\u8a00\uff0c\u6700\u6b63\u786e\u7684\u505c\u6b62\u7ebf\u7a0b\u7684\u65b9\u5f0f\u662f\u4f7f\u7528 interrupt\u3002\u4f46 interrupt\u4ec5\u4ec5\u8d77\u5230\u901a\u77e5\u88ab\u505c\u6b62\u7ebf\u7a0b\u7684\u4f5c\u7528\u3002\u800c\u5bf9\u4e8e\u88ab\u505c\u6b62\u7684\u7ebf\u7a0b\u800c\u8a00\uff0c\u5b83\u62e5\u6709\u5b8c\u5168\u7684\u81ea\u4e3b\u6743\uff0c\u5b83\u65e2\u53ef\u4ee5\u9009\u62e9\u7acb\u5373\u505c\u6b62\uff0c\u4e5f\u53ef\u4ee5\u9009\u62e9\u4e00\u6bb5\u65f6\u95f4\u540e\u505c\u6b62\uff0c\u4e5f\u53ef\u4ee5\u9009\u62e9\u538b\u6839\u4e0d\u505c\u6b62\u3002<\/span><\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;outline: 0px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &quot;PingFang SC&quot;, Cambria, Cochin, Georgia, Times, &quot;Times New Roman&quot;, serif;font-size: 16px;text-align: left;background-color: rgb(255, 255, 255);line-height: 26px;visibility: visible;\"><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\"><strong style=\"outline: 0px;visibility: visible;\">\u4e3a\u4ec0\u4e48 Java \u4e0d\u63d0\u4f9b\u5f3a\u5236\u505c\u6b62\u7ebf\u7a0b\u7684\u80fd\u529b\u5462\uff1f<\/strong><\/span><\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;outline: 0px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &quot;PingFang SC&quot;, Cambria, Cochin, Georgia, Times, &quot;Times New Roman&quot;, serif;font-size: 16px;text-align: left;background-color: rgb(255, 255, 255);line-height: 26px;visibility: visible;\"><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">\u4e8b\u5b9e\u4e0a\uff0cJava \u5e0c\u671b\u7a0b\u5e8f\u95f4\u80fd\u591f\u76f8\u4e92\u901a\u77e5\u3001\u76f8\u4e92\u534f\u4f5c\u5730\u7ba1\u7406\u7ebf\u7a0b\uff0c\u56e0\u4e3a\u5982\u679c\u4e0d\u4e86\u89e3\u5bf9\u65b9\u6b63\u5728\u505a\u7684\u5de5\u4f5c\uff0c\u8d38\u7136\u5f3a\u5236\u505c\u6b62\u7ebf\u7a0b\u5c31\u53ef\u80fd\u4f1a\u9020\u6210\u4e00\u4e9b\u5b89\u5168\u7684\u95ee\u9898\u3002<\/span><\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;outline: 0px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &quot;PingFang SC&quot;, Cambria, Cochin, Georgia, Times, &quot;Times New Roman&quot;, serif;font-size: 16px;text-align: left;background-color: rgb(255, 255, 255);line-height: 26px;visibility: visible;\"><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">\u6bd4\u5982\uff1a<\/span><\/p>\n<blockquote data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 20px;margin-bottom: 20px;padding: 10px 10px 10px 20px;outline: 0px;border-left-color: rgba(0, 0, 0, 0.4);color: rgb(106, 115, 125);font-size: 0.9em;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &quot;PingFang SC&quot;, Cambria, Cochin, Georgia, Times, &quot;Times New Roman&quot;, serif;text-align: left;border-top: none;border-right: none;border-bottom: none;overflow: auto;background: rgba(0, 0, 0, 0.05);\">\n<p style=\"padding-top: 8px;padding-bottom: 8px;outline: 0px;font-size: 16px;color: black;line-height: 26px;\"><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">\u7ebf\u7a0b\u6b63\u5728\u5199\u5165\u4e00\u4e2a\u6587\u4ef6\uff0c\u8fd9\u65f6\u6536\u5230\u7ec8\u6b62\u4fe1\u53f7\uff0c\u5b83\u5c31\u9700\u8981\u6839\u636e\u81ea\u8eab\u4e1a\u52a1\u5224\u65ad\uff0c\u662f\u9009\u62e9\u7acb\u5373\u505c\u6b62\uff0c\u8fd8\u662f\u5c06\u6574\u4e2a\u6587\u4ef6\u5199\u5165\u6210\u529f\u540e\u505c\u6b62\u3002\u5982\u679c\u9009\u62e9\u7acb\u5373\u505c\u6b62\u5c31\u53ef\u80fd\u9020\u6210\u6570\u636e\u4e0d\u5b8c\u6574\uff0c\u4e0d\u7ba1\u662f\u4e2d\u65ad\u547d\u4ee4\u53d1\u8d77\u8005\uff0c\u8fd8\u662f\u63a5\u6536\u8005\u90fd\u4e0d\u5e0c\u671b\u6570\u636e\u51fa\u73b0\u95ee\u9898\u3002<\/span><\/p>\n<\/blockquote>\n<h3 data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 30px;margin-bottom: 15px;outline: 0px;font-weight: bold;font-size: 20px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &quot;PingFang SC&quot;, Cambria, Cochin, Georgia, Times, &quot;Times New Roman&quot;, serif;text-align: left;background-color: rgb(255, 255, 255);\"><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">\u5982\u4f55\u7528 interrupt \u505c\u6b62\u7ebf\u7a0b<\/span><\/h3>\n<pre data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 10px;margin-bottom: 10px;outline: 0px;color: rgb(0, 0, 0);font-size: 16px;text-align: left;background-color: rgb(255, 255, 255);\"><code style=\"padding: 16px;outline: 0px;overflow-x: auto;background: rgb(39, 40, 34);color: rgb(221, 221, 221);display: -webkit-box;font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;border-radius: 0px;font-size: 12px;\"><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\"><span style=\"outline: 0px;color: rgb(249, 38, 114);font-weight: bold;line-height: 26px;\">while<\/span>(!Thread.currentThread().isInterrupted()&amp;&amp;moreworkto<span style=\"outline: 0px;color: rgb(249, 38, 114);font-weight: bold;line-height: 26px;\">do<\/span>){<span style=\"outline: 0px;color: rgb(249, 38, 114);font-weight: bold;line-height: 26px;\">do<\/span>morework}<\/span><\/code><\/pre>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;outline: 0px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &quot;PingFang SC&quot;, Cambria, Cochin, Georgia, Times, &quot;Times New Roman&quot;, serif;font-size: 16px;text-align: left;background-color: rgb(255, 255, 255);line-height: 26px;\"><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">\u6211\u4eec\u4e00\u65e6\u8c03\u7528\u67d0\u4e2a\u7ebf\u7a0b\u7684<\/span><code style=\"margin-right: 2px;margin-left: 2px;padding: 2px 4px;outline: 0px;font-size: 14px;border-radius: 4px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;\"><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">interrupt()<\/span><\/code><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">\u4e4b\u540e\uff0c\u8fd9\u4e2a\u7ebf\u7a0b\u7684\u4e2d\u65ad\u6807\u8bb0\u4f4d\u5c31\u4f1a\u88ab\u8bbe\u7f6e\u6210 true\u3002\u6bcf\u4e2a\u7ebf\u7a0b\u90fd\u6709\u8fd9\u6837\u7684\u6807\u8bb0\u4f4d\uff0c\u5f53\u7ebf\u7a0b\u6267\u884c\u65f6\uff0c\u5e94\u8be5\u5b9a\u671f\u68c0\u67e5\u8fd9\u4e2a\u6807\u8bb0\u4f4d\uff0c\u5982\u679c\u6807\u8bb0\u4f4d\u88ab\u8bbe\u7f6e\u6210 true\uff0c\u5c31\u8bf4\u660e\u6709\u7a0b\u5e8f\u60f3\u7ec8\u6b62\u8be5\u7ebf\u7a0b\u3002<\/span><\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;outline: 0px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &quot;PingFang SC&quot;, Cambria, Cochin, Georgia, Times, &quot;Times New Roman&quot;, serif;font-size: 16px;text-align: left;background-color: rgb(255, 255, 255);line-height: 26px;\"><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">\u56de\u5230\u6e90\u7801\uff0c\u53ef\u4ee5\u770b\u5230\u5728 while \u5faa\u73af\u4f53\u5224\u65ad\u8bed\u53e5\u4e2d\uff0c\u9996\u5148\u901a\u8fc7<\/span><code style=\"margin-right: 2px;margin-left: 2px;padding: 2px 4px;outline: 0px;font-size: 14px;border-radius: 4px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;\"><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">Thread.currentThread().isInterrupt()<\/span><\/code><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">\u5224\u65ad\u7ebf\u7a0b\u662f\u5426\u88ab\u4e2d\u65ad\uff0c\u968f\u540e\u68c0\u67e5\u662f\u5426\u8fd8\u6709\u5de5\u4f5c\u8981\u505a\u3002&amp;&amp; \u903b\u8f91\u8868\u793a\u53ea\u6709\u5f53\u4e24\u4e2a\u5224\u65ad\u6761\u4ef6\u540c\u65f6\u6ee1\u8db3\u7684\u60c5\u51b5\u4e0b\uff0c\u624d\u4f1a\u53bb\u6267\u884c\u4e0b\u9762\u7684\u5de5\u4f5c\u3002<\/span><\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;outline: 0px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &quot;PingFang SC&quot;, Cambria, Cochin, Georgia, Times, &quot;Times New Roman&quot;, serif;font-size: 16px;text-align: left;background-color: rgb(255, 255, 255);line-height: 26px;\"><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">\u6765\u6bb5\u4ee3\u7801\u7785\u7785\u3002<\/span><\/p>\n<pre data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 10px;margin-bottom: 10px;outline: 0px;color: rgb(0, 0, 0);font-size: 16px;text-align: left;background-color: rgb(255, 255, 255);\"><code style=\"padding: 16px;outline: 0px;overflow-x: auto;background: rgb(39, 40, 34);color: rgb(221, 221, 221);display: -webkit-box;font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;border-radius: 0px;font-size: 12px;\"><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\"><span style=\"outline: 0px;color: rgb(249, 38, 114);font-weight: bold;line-height: 26px;\">public<\/span><span style=\"outline: 0px;line-height: 26px;\"><span style=\"outline: 0px;color: rgb(249, 38, 114);font-weight: bold;line-height: 26px;\">class<\/span><span style=\"outline: 0px;font-weight: bold;color: white;line-height: 26px;\">StopThread<\/span><span style=\"outline: 0px;color: rgb(249, 38, 114);font-weight: bold;line-height: 26px;\">implements<\/span><span style=\"outline: 0px;font-weight: bold;color: white;line-height: 26px;\">Runnable<\/span><\/span>{<span style=\"outline: 0px;color: rgb(117, 113, 94);line-height: 26px;\">@Override<\/span><span style=\"outline: 0px;line-height: 26px;\"><span style=\"outline: 0px;color: rgb(249, 38, 114);font-weight: bold;line-height: 26px;\">public<\/span><span style=\"outline: 0px;color: rgb(249, 38, 114);font-weight: bold;line-height: 26px;\">void<\/span><span style=\"outline: 0px;color: rgb(166, 226, 46);font-weight: bold;line-height: 26px;\">run<\/span><span style=\"outline: 0px;line-height: 26px;\">()<\/span><\/span>{<span style=\"outline: 0px;color: rgb(249, 38, 114);font-weight: bold;line-height: 26px;\">int<\/span>count=<span style=\"outline: 0px;line-height: 26px;\">0<\/span>;<span style=\"outline: 0px;color: rgb(249, 38, 114);font-weight: bold;line-height: 26px;\">while<\/span>(!Thread.currentThread().isInterrupted()&amp;&amp;count&lt;<span style=\"outline: 0px;line-height: 26px;\">1000<\/span>){System.out.println(<span style=\"outline: 0px;color: rgb(166, 226, 46);line-height: 26px;\">\"count=\"<\/span>+count++);}}<span style=\"outline: 0px;line-height: 26px;\"><span style=\"outline: 0px;color: rgb(249, 38, 114);font-weight: bold;line-height: 26px;\">public<\/span><span style=\"outline: 0px;color: rgb(249, 38, 114);font-weight: bold;line-height: 26px;\">static<\/span><span style=\"outline: 0px;color: rgb(249, 38, 114);font-weight: bold;line-height: 26px;\">void<\/span><span style=\"outline: 0px;color: rgb(166, 226, 46);font-weight: bold;line-height: 26px;\">main<\/span><span style=\"outline: 0px;line-height: 26px;\">(String[]args)<\/span><span style=\"outline: 0px;color: rgb(249, 38, 114);font-weight: bold;line-height: 26px;\">throws<\/span>InterruptedException<\/span>{Threadthread=<span style=\"outline: 0px;color: rgb(249, 38, 114);font-weight: bold;line-height: 26px;\">new<\/span>Thread(<span style=\"outline: 0px;color: rgb(249, 38, 114);font-weight: bold;line-height: 26px;\">new<\/span>StopThread());thread.start();Thread.sleep(<span style=\"outline: 0px;line-height: 26px;\">5<\/span>);thread.interrupt();}}<\/span><\/code><\/pre>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;outline: 0px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &quot;PingFang SC&quot;, Cambria, Cochin, Georgia, Times, &quot;Times New Roman&quot;, serif;font-size: 16px;text-align: left;background-color: rgb(255, 255, 255);line-height: 26px;\"><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">\u5728 StopThread \u7c7b\u7684<\/span><code style=\"margin-right: 2px;margin-left: 2px;padding: 2px 4px;outline: 0px;font-size: 14px;border-radius: 4px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;\"><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">run()<\/span><\/code><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">\u65b9\u6cd5\u4e2d\uff0c\u9996\u5148\u5224\u65ad\u7ebf\u7a0b\u662f\u5426\u88ab\u4e2d\u65ad\uff0c\u7136\u540e\u5224\u65ad count \u503c\u662f\u5426\u5c0f\u4e8e 1000\u3002<\/span><\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;outline: 0px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &quot;PingFang SC&quot;, Cambria, Cochin, Georgia, Times, &quot;Times New Roman&quot;, serif;font-size: 16px;text-align: left;background-color: rgb(255, 255, 255);line-height: 26px;\"><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">\u8fd9\u4e2a\u7ebf\u7a0b\u7684\u5de5\u4f5c\u5185\u5bb9\u5f88\u7b80\u5355\uff0c\u5c31\u662f\u6253\u5370 0~999 \u7684\u6570\u5b57\uff0c\u6bcf\u6253\u5370\u4e00\u4e2a\u6570\u5b57 count \u503c\u52a0 1\uff0c\u53ef\u4ee5\u770b\u5230\uff0c\u7ebf\u7a0b\u4f1a\u5728\u6bcf\u6b21\u5faa\u73af\u5f00\u59cb\u4e4b\u524d\uff0c\u68c0\u67e5\u662f\u5426\u88ab\u4e2d\u65ad\u4e86\u3002\u63a5\u4e0b\u6765\u5728 main \u51fd\u6570\u4e2d\u4f1a\u542f\u52a8\u8be5\u7ebf\u7a0b\uff0c\u7136\u540e\u4f11\u7720 5 \u6beb\u79d2\u540e\u7acb\u523b\u4e2d\u65ad\u7ebf\u7a0b\uff0c\u8be5\u7ebf\u7a0b\u4f1a\u68c0\u6d4b\u5230\u4e2d\u65ad\u4fe1\u53f7\uff0c\u4e8e\u662f\u5728\u8fd8\u6ca1\u6253\u5370\u5b8c1000\u4e2a\u6570\u7684\u65f6\u5019\u5c31\u4f1a\u505c\u4e0b\u6765\uff0c\u8fd9\u79cd\u5c31\u5c5e\u4e8e\u901a\u8fc7 interrupt \u6b63\u786e\u505c\u6b62\u7ebf\u7a0b\u7684\u60c5\u51b5\u3002<\/span><\/p>\n<h3 data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 30px;margin-bottom: 15px;outline: 0px;font-weight: bold;font-size: 20px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &quot;PingFang SC&quot;, Cambria, Cochin, Georgia, Times, &quot;Times New Roman&quot;, serif;text-align: left;background-color: rgb(255, 255, 255);\"><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">sleep \u671f\u95f4\u80fd\u5426\u611f\u53d7\u5230\u4e2d\u65ad<\/span><\/h3>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;outline: 0px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &quot;PingFang SC&quot;, Cambria, Cochin, Georgia, Times, &quot;Times New Roman&quot;, serif;font-size: 16px;text-align: left;background-color: rgb(255, 255, 255);line-height: 26px;\"><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">\u5148\u8bf4\u7ed3\u8bba\uff0c\u53ef\u4ee5\u3002<\/span><\/p>\n<pre data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 10px;margin-bottom: 10px;outline: 0px;color: rgb(0, 0, 0);font-size: 16px;text-align: left;background-color: rgb(255, 255, 255);\"><code style=\"padding: 16px;outline: 0px;overflow-x: auto;background: rgb(39, 40, 34);color: rgb(221, 221, 221);display: -webkit-box;font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;border-radius: 0px;font-size: 12px;\"><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\"><span style=\"outline: 0px;color: rgb(249, 38, 114);font-weight: bold;line-height: 26px;\">public<\/span><span style=\"outline: 0px;line-height: 26px;\"><span style=\"outline: 0px;color: rgb(249, 38, 114);font-weight: bold;line-height: 26px;\">class<\/span><span style=\"outline: 0px;font-weight: bold;color: white;line-height: 26px;\">StopDuringSleep<\/span><\/span>{<span style=\"outline: 0px;line-height: 26px;\"><span style=\"outline: 0px;color: rgb(249, 38, 114);font-weight: bold;line-height: 26px;\">public<\/span><span style=\"outline: 0px;color: rgb(249, 38, 114);font-weight: bold;line-height: 26px;\">static<\/span><span style=\"outline: 0px;color: rgb(249, 38, 114);font-weight: bold;line-height: 26px;\">void<\/span><span style=\"outline: 0px;color: rgb(166, 226, 46);font-weight: bold;line-height: 26px;\">main<\/span><span style=\"outline: 0px;line-height: 26px;\">(String[]args)<\/span><span style=\"outline: 0px;color: rgb(249, 38, 114);font-weight: bold;line-height: 26px;\">throws<\/span>InterruptedException<\/span>{Runnablerunnable=()-&gt;{<span style=\"outline: 0px;color: rgb(249, 38, 114);font-weight: bold;line-height: 26px;\">int<\/span>num=<span style=\"outline: 0px;line-height: 26px;\">0<\/span>;<span style=\"outline: 0px;color: rgb(249, 38, 114);font-weight: bold;line-height: 26px;\">try<\/span>{<span style=\"outline: 0px;color: rgb(249, 38, 114);font-weight: bold;line-height: 26px;\">while<\/span>(!Thread.currentThread().isInterrupted()&amp;&amp;num&lt;=<span style=\"outline: 0px;line-height: 26px;\">1000<\/span>){System.out.println(num);num++;Thread.sleep(<span style=\"outline: 0px;line-height: 26px;\">1000000<\/span>);}}<span style=\"outline: 0px;color: rgb(249, 38, 114);font-weight: bold;line-height: 26px;\">catch<\/span>(InterruptedExceptione){e.printStackTrace();}};Threadthread=<span style=\"outline: 0px;color: rgb(249, 38, 114);font-weight: bold;line-height: 26px;\">new<\/span>Thread(runnable);thread.start();Thread.sleep(<span style=\"outline: 0px;line-height: 26px;\">5<\/span>);thread.interrupt();}}<\/span><\/code><\/pre>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;outline: 0px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &quot;PingFang SC&quot;, Cambria, Cochin, Georgia, Times, &quot;Times New Roman&quot;, serif;font-size: 16px;text-align: left;background-color: rgb(255, 255, 255);line-height: 26px;\"><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">\u8fd0\u884c\u540e\u7684\u7ed3\u679c\u4f60\u731c\u8fd9\u4e48\u7740\uff0c\u7a0b\u5e8f\u4f1a\u629b\u51fa\u5f02\u5e38<\/span><\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;outline: 0px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &quot;PingFang SC&quot;, Cambria, Cochin, Georgia, Times, &quot;Times New Roman&quot;, serif;font-size: 16px;text-align: left;background-color: rgb(255, 255, 255);line-height: 26px;\"><img decoding=\"async\" class=\"rich_pages wxw-img lazyload\" data-ratio=\"0.39069767441860465\"  data-w=\"645\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801220018905.png\" 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-ratio=\"0.39069767441860465\"  data-w=\"645\" src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801220018905.png\"><\/noscript><\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;outline: 0px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &quot;PingFang SC&quot;, Cambria, Cochin, Georgia, Times, &quot;Times New Roman&quot;, serif;font-size: 16px;text-align: left;background-color: rgb(255, 255, 255);line-height: 26px;\"><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">\u5982\u679c sleep\u3001wait \u7b49\u53ef\u4ee5\u8ba9\u7ebf\u7a0b\u8fdb\u5165\u963b\u585e\u7684\u65b9\u6cd5\u4f7f\u7ebf\u7a0b\u4f11\u7720\u4e86\uff0c\u800c\u5904\u4e8e\u4f11\u7720\u4e2d\u7684\u7ebf\u7a0b\u88ab\u4e2d\u65ad\uff0c\u90a3\u4e48\u7ebf\u7a0b\u662f\u53ef\u4ee5\u611f\u53d7\u5230\u4e2d\u65ad\u4fe1\u53f7\u7684\uff0c\u5e76\u4e14\u4f1a\u629b\u51fa\u4e00\u4e2a<\/span><code style=\"margin-right: 2px;margin-left: 2px;padding: 2px 4px;outline: 0px;font-size: 14px;border-radius: 4px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;\"><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">InterruptedException<\/span><\/code><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">\u5f02\u5e38\uff0c\u540c\u65f6\u6e05\u9664\u4e2d\u65ad\u4fe1\u53f7\uff0c\u5c06\u4e2d\u65ad\u6807\u8bb0\u4f4d\u8bbe\u7f6e\u6210 false\u3002\u8fd9\u6837\u4e00\u6765\u5c31\u4e0d\u7528\u62c5\u5fc3\u957f\u65f6\u95f4\u4f11\u7720\u4e2d\u7ebf\u7a0b\u611f\u53d7\u4e0d\u5230\u4e2d\u65ad\u4e86\uff0c\u56e0\u4e3a\u5373\u4fbf\u7ebf\u7a0b\u8fd8\u5728\u4f11\u7720\uff0c\u4ecd\u7136\u80fd\u591f\u54cd\u5e94\u4e2d\u65ad\u901a\u77e5\uff0c\u5e76\u629b\u51fa\u5f02\u5e38\u3002<\/span><\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;outline: 0px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &quot;PingFang SC&quot;, Cambria, Cochin, Georgia, Times, &quot;Times New Roman&quot;, serif;font-size: 16px;text-align: left;background-color: rgb(255, 255, 255);line-height: 26px;\"><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">\u4f46\u662f\u8fd9\u6837\u53ea\u80fd\u76f8\u5e94\u4e00\u6b21\u4e2d\u65ad\u4fe1\u53f7\u4e86\uff0c\u600e\u4e48\u529e\uff1f<\/span><\/p>\n<h5 data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 30px;margin-bottom: 15px;outline: 0px;font-weight: bold;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &quot;PingFang SC&quot;, Cambria, Cochin, Georgia, Times, &quot;Times New Roman&quot;, serif;text-align: left;background-color: rgb(255, 255, 255);\"><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">\u5408\u7406\u5229\u7528\u597d try\/catch<\/span><\/h5>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;outline: 0px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &quot;PingFang SC&quot;, Cambria, Cochin, Georgia, Times, &quot;Times New Roman&quot;, serif;font-size: 16px;text-align: left;background-color: rgb(255, 255, 255);line-height: 26px;\"><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">\u6211\u4eec\u5728\u5b9e\u9645\u5f00\u53d1\u4e2d\u4e0d\u80fd\u76f2\u76ee\u541e\u6389\u4e2d\u65ad\uff0c\u5982\u679c\u4e0d\u5728\u65b9\u6cd5\u7b7e\u540d\u4e2d\u58f0\u660e\uff0c\u4e5f\u4e0d\u5728 catch \u8bed\u53e5\u5757\u4e2d\u518d\u6b21\u6062\u590d\u4e2d\u65ad\uff0c\u800c\u662f\u5728 catch \u4e2d\u4e0d\u4f5c\u5904\u7406\uff0c\u6211\u4eec\u79f0\u8fd9\u79cd\u884c\u4e3a\u662f\u201c\u5c4f\u853d\u4e86\u4e2d\u65ad\u8bf7\u6c42\u201d\u3002\u5982\u679c\u6211\u4eec\u76f2\u76ee\u5730\u5c4f\u853d\u4e86\u4e2d\u65ad\u8bf7\u6c42\uff0c\u4f1a\u5bfc\u81f4\u4e2d\u65ad\u4fe1\u53f7\u88ab\u5b8c\u5168\u5ffd\u7565\uff0c\u6700\u7ec8\u5bfc\u81f4\u7ebf\u7a0b\u65e0\u6cd5\u6b63\u786e\u505c\u6b62\u3002<\/span><\/p>\n<pre data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 10px;margin-bottom: 10px;outline: 0px;color: rgb(0, 0, 0);font-size: 16px;text-align: left;background-color: rgb(255, 255, 255);\"><code style=\"padding: 16px;outline: 0px;overflow-x: auto;background: rgb(39, 40, 34);color: rgb(221, 221, 221);display: -webkit-box;font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;border-radius: 0px;font-size: 12px;\"><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\"><span style=\"outline: 0px;color: rgb(249, 38, 114);font-weight: bold;line-height: 26px;\">try<\/span>{Thread.sleep(<span style=\"outline: 0px;line-height: 26px;\">2000<\/span>);}<span style=\"outline: 0px;color: rgb(249, 38, 114);font-weight: bold;line-height: 26px;\">catch<\/span>(InterruptedExceptione){<span style=\"outline: 0px;color: rgb(117, 113, 94);line-height: 26px;\">\/\/\u6b64\u5904\u5904\u7406\u4e2d\u65ad\u5f02\u5e38\u8bf7\u6c42<\/span>}<\/span><\/code><\/pre>\n<h3 data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 30px;margin-bottom: 15px;outline: 0px;font-weight: bold;font-size: 20px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &quot;PingFang SC&quot;, Cambria, Cochin, Georgia, Times, &quot;Times New Roman&quot;, serif;text-align: left;background-color: rgb(255, 255, 255);\"><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">\u505c\u6b62\u7ebf\u7a0b\u7684\u65b9\u5f0f\u6709\u51e0\u79cd<\/span><\/h3>\n<ul data-tool=\"mdnice\u7f16\u8f91\u5668\" class=\"list-paddingleft-1\" style=\"margin-top: 8px;margin-bottom: 8px;padding-left: 25px;outline: 0px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &quot;PingFang SC&quot;, Cambria, Cochin, Georgia, Times, &quot;Times New Roman&quot;, serif;font-size: 16px;text-align: left;background-color: rgb(255, 255, 255);\">\n<li style=\"outline: 0px;font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">\n<section style=\"margin-top: 5px;margin-bottom: 5px;outline: 0px;line-height: 26px;color: rgb(1, 1, 1);\"><code style=\"margin-right: 2px;margin-left: 2px;padding: 2px 4px;outline: 0px;font-size: 14px;border-radius: 4px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;\"><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">void shutdown;<\/span><\/code><\/section>\n<\/li>\n<li style=\"outline: 0px;font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">\n<section style=\"margin-top: 5px;margin-bottom: 5px;outline: 0px;line-height: 26px;color: rgb(1, 1, 1);\"><code style=\"margin-right: 2px;margin-left: 2px;padding: 2px 4px;outline: 0px;font-size: 14px;border-radius: 4px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;\"><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">boolean isShutdown;<\/span><\/code><\/section>\n<\/li>\n<li style=\"outline: 0px;font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">\n<section style=\"margin-top: 5px;margin-bottom: 5px;outline: 0px;line-height: 26px;color: rgb(1, 1, 1);\"><code style=\"margin-right: 2px;margin-left: 2px;padding: 2px 4px;outline: 0px;font-size: 14px;border-radius: 4px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;\"><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">boolean isTerminated;<\/span><\/code><\/section>\n<\/li>\n<li style=\"outline: 0px;font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">\n<section style=\"margin-top: 5px;margin-bottom: 5px;outline: 0px;line-height: 26px;color: rgb(1, 1, 1);\"><code style=\"margin-right: 2px;margin-left: 2px;padding: 2px 4px;outline: 0px;font-size: 14px;border-radius: 4px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;\"><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">boolean awaitTermination(long timeout, TimeUnit unit) throws InterruptedException;<\/span><\/code><\/section>\n<\/li>\n<li style=\"outline: 0px;font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">\n<section style=\"margin-top: 5px;margin-bottom: 5px;outline: 0px;line-height: 26px;color: rgb(1, 1, 1);\"><code style=\"margin-right: 2px;margin-left: 2px;padding: 2px 4px;outline: 0px;font-size: 14px;border-radius: 4px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;\"><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">List&lt;Runnable&gt; shutdownNow;<\/span><\/code><\/section>\n<\/li>\n<\/ul>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;outline: 0px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &quot;PingFang SC&quot;, Cambria, Cochin, Georgia, Times, &quot;Times New Roman&quot;, serif;font-size: 16px;text-align: left;background-color: rgb(255, 255, 255);line-height: 26px;\"><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">\u4e0b\u9762\u6211\u4eec\u5c31\u5bf9\u8fd9\u4e9b\u65b9\u6cd5\u9010\u4e00\u5c55\u5f00\u3002<\/span><\/p>\n<h5 data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 30px;margin-bottom: 15px;outline: 0px;font-weight: bold;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &quot;PingFang SC&quot;, Cambria, Cochin, Georgia, Times, &quot;Times New Roman&quot;, serif;text-align: left;background-color: rgb(255, 255, 255);\"><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">shutdown()<\/span><\/h5>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;outline: 0px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &quot;PingFang SC&quot;, Cambria, Cochin, Georgia, Times, &quot;Times New Roman&quot;, serif;font-size: 16px;text-align: left;background-color: rgb(255, 255, 255);line-height: 26px;\"><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">\u8c03\u7528<\/span><code style=\"margin-right: 2px;margin-left: 2px;padding: 2px 4px;outline: 0px;font-size: 14px;border-radius: 4px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;\"><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">shutdown()<\/span><\/code><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">\u65b9\u6cd5\u4e4b\u540e\u7ebf\u7a0b\u6c60\u5e76\u4e0d\u662f\u7acb\u523b\u5c31\u88ab\u5173\u95ed\uff0c\u56e0\u4e3a\u8fd9\u65f6\u7ebf\u7a0b\u6c60\u4e2d\u53ef\u80fd\u8fd8\u6709\u5f88\u591a\u4efb\u52a1\u6b63\u5728\u88ab\u6267\u884c\uff0c\u6216\u662f\u4efb\u52a1\u961f\u5217\u4e2d\u6709\u5927\u91cf\u6b63\u5728\u7b49\u5f85\u88ab\u6267\u884c\u7684\u4efb\u52a1\uff0c\u8c03\u7528<\/span><code style=\"margin-right: 2px;margin-left: 2px;padding: 2px 4px;outline: 0px;font-size: 14px;border-radius: 4px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;\"><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">shutdown()<\/span><\/code><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">\u65b9\u6cd5\u540e\u7ebf\u7a0b\u6c60\u4f1a\u5728\u6267\u884c\u5b8c\u6b63\u5728\u6267\u884c\u7684\u4efb\u52a1\u548c\u961f\u5217\u4e2d\u7b49\u5f85\u7684\u4efb\u52a1\u540e\u624d\u5f7b\u5e95\u5173\u95ed\u3002<\/span><\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;outline: 0px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &quot;PingFang SC&quot;, Cambria, Cochin, Georgia, Times, &quot;Times New Roman&quot;, serif;font-size: 16px;text-align: left;background-color: rgb(255, 255, 255);line-height: 26px;\"><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">\u4f46\u8fd9\u5e76\u4e0d\u4ee3\u8868<\/span><code style=\"margin-right: 2px;margin-left: 2px;padding: 2px 4px;outline: 0px;font-size: 14px;border-radius: 4px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;\"><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">shutdown()<\/span><\/code><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">\u64cd\u4f5c\u662f\u6ca1\u6709\u4efb\u4f55\u6548\u679c\u7684\uff0c\u8c03\u7528<\/span><code style=\"margin-right: 2px;margin-left: 2px;padding: 2px 4px;outline: 0px;font-size: 14px;border-radius: 4px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;\"><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">shutdown()<\/span><\/code><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">\u65b9\u6cd5\u540e\u5982\u679c\u8fd8\u6709\u65b0\u7684\u4efb\u52a1\u88ab\u63d0\u4ea4\uff0c\u7ebf\u7a0b\u6c60\u5219\u4f1a\u6839\u636e\u62d2\u7edd\u7b56\u7565\u76f4\u63a5\u62d2\u7edd\u540e\u7eed\u65b0\u63d0\u4ea4\u7684\u4efb\u52a1\u3002<\/span><\/p>\n<h5 data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 30px;margin-bottom: 15px;outline: 0px;font-weight: bold;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &quot;PingFang SC&quot;, Cambria, Cochin, Georgia, Times, &quot;Times New Roman&quot;, serif;text-align: left;background-color: rgb(255, 255, 255);\"><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">isShutdown()<\/span><\/h5>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;outline: 0px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &quot;PingFang SC&quot;, Cambria, Cochin, Georgia, Times, &quot;Times New Roman&quot;, serif;font-size: 16px;text-align: left;background-color: rgb(255, 255, 255);line-height: 26px;\"><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">\u5b83\u53ef\u4ee5\u8fd4\u56de true \u6216\u8005 false \u6765\u5224\u65ad\u7ebf\u7a0b\u6c60\u662f\u5426\u5df2\u7ecf\u5f00\u59cb\u4e86\u5173\u95ed\u5de5\u4f5c\uff0c\u4e5f\u5c31\u662f\u662f\u5426\u6267\u884c\u4e86<\/span><code style=\"margin-right: 2px;margin-left: 2px;padding: 2px 4px;outline: 0px;font-size: 14px;border-radius: 4px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;\"><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">shutdown<\/span><\/code><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">\u6216\u8005<\/span><code style=\"margin-right: 2px;margin-left: 2px;padding: 2px 4px;outline: 0px;font-size: 14px;border-radius: 4px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;\"><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">shutdownNow<\/span><\/code><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">\u65b9\u6cd5\u3002\u8fd9\u91cc\u9700\u8981\u6ce8\u610f\uff0c\u5982\u679c\u8c03\u7528<\/span><code style=\"margin-right: 2px;margin-left: 2px;padding: 2px 4px;outline: 0px;font-size: 14px;border-radius: 4px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;\"><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">isShutdown()<\/span><\/code><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">\u65b9\u6cd5\u7684\u8fd4\u56de\u7684\u7ed3\u679c\u4e3a true \u5e76\u4e0d\u4ee3\u8868\u7ebf\u7a0b\u6c60\u6b64\u65f6\u5df2\u7ecf\u5f7b\u5e95\u5173\u95ed\u4e86\uff0c\u8fd9\u4ec5\u4ec5\u4ee3\u8868\u7ebf\u7a0b\u6c60\u5f00\u59cb\u4e86\u5173\u95ed\u7684\u6d41\u7a0b\uff0c\u4e5f\u5c31\u662f\u8bf4\uff0c\u6b64\u65f6\u53ef\u80fd\u7ebf\u7a0b\u6c60\u4e2d\u4f9d\u7136\u6709\u7ebf\u7a0b\u5728\u6267\u884c\u4efb\u52a1\uff0c\u961f\u5217\u91cc\u4e5f\u53ef\u80fd\u6709\u7b49\u5f85\u88ab\u6267\u884c\u7684\u4efb\u52a1\u3002<\/span><\/p>\n<h5 data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 30px;margin-bottom: 15px;outline: 0px;font-weight: bold;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &quot;PingFang SC&quot;, Cambria, Cochin, Georgia, Times, &quot;Times New Roman&quot;, serif;text-align: left;background-color: rgb(255, 255, 255);\"><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">isTerminated()<\/span><\/h5>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;outline: 0px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &quot;PingFang SC&quot;, Cambria, Cochin, Georgia, Times, &quot;Times New Roman&quot;, serif;font-size: 16px;text-align: left;background-color: rgb(255, 255, 255);line-height: 26px;\"><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">\u8fd9\u4e2a\u65b9\u6cd5\u53ef\u4ee5\u68c0\u6d4b\u7ebf\u7a0b\u6c60\u662f\u5426\u771f\u6b63\u201c\u7ec8\u7ed3\u201d\u4e86\uff0c\u8fd9\u4e0d\u4ec5\u4ee3\u8868\u7ebf\u7a0b\u6c60\u5df2\u5173\u95ed\uff0c\u540c\u65f6\u4ee3\u8868\u7ebf\u7a0b\u6c60\u4e2d\u7684\u6240\u6709\u4efb\u52a1\u90fd\u5df2\u7ecf\u90fd\u6267\u884c\u5b8c\u6bd5\u4e86\uff0c\u56e0\u4e3a\u6211\u4eec\u521a\u624d\u8bf4\u8fc7\uff0c\u8c03\u7528<\/span><code style=\"margin-right: 2px;margin-left: 2px;padding: 2px 4px;outline: 0px;font-size: 14px;border-radius: 4px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;\"><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">shutdown<\/span><\/code><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">\u65b9\u6cd5\u4e4b\u540e\uff0c\u7ebf\u7a0b\u6c60\u4f1a\u7ee7\u7eed\u6267\u884c\u91cc\u9762\u672a\u5b8c\u6210\u7684\u4efb\u52a1\uff0c\u4e0d\u4ec5\u5305\u62ec\u7ebf\u7a0b\u6b63\u5728\u6267\u884c\u7684\u4efb\u52a1\uff0c\u8fd8\u5305\u62ec\u6b63\u5728\u4efb\u52a1\u961f\u5217\u4e2d\u7b49\u5f85\u7684\u4efb\u52a1\u3002<\/span><\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;outline: 0px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &quot;PingFang SC&quot;, Cambria, Cochin, Georgia, Times, &quot;Times New Roman&quot;, serif;font-size: 16px;text-align: left;background-color: rgb(255, 255, 255);line-height: 26px;\"><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">\u6bd4\u5982\u6b64\u65f6\u5df2\u7ecf\u8c03\u7528\u4e86<\/span><code style=\"margin-right: 2px;margin-left: 2px;padding: 2px 4px;outline: 0px;font-size: 14px;border-radius: 4px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;\"><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">shutdown<\/span><\/code><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">\u65b9\u6cd5\uff0c\u4f46\u662f\u6709\u4e00\u4e2a\u7ebf\u7a0b\u4f9d\u7136\u5728\u6267\u884c\u4efb\u52a1\uff0c\u90a3\u4e48\u6b64\u65f6\u8c03\u7528<\/span><code style=\"margin-right: 2px;margin-left: 2px;padding: 2px 4px;outline: 0px;font-size: 14px;border-radius: 4px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;\"><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">isShutdown<\/span><\/code><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">\u65b9\u6cd5\u8fd4\u56de\u7684\u662f true \uff0c\u800c\u8c03\u7528<\/span><code style=\"margin-right: 2px;margin-left: 2px;padding: 2px 4px;outline: 0px;font-size: 14px;border-radius: 4px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;\"><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">isTerminated<\/span><\/code><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">\u65b9\u6cd5\u8fd4\u56de\u7684\u4fbf\u662f false \uff0c\u56e0\u4e3a\u7ebf\u7a0b\u6c60\u4e2d\u8fd8\u6709\u4efb\u52a1\u6b63\u5728\u5728\u88ab\u6267\u884c\uff0c\u7ebf\u7a0b\u6c60\u5e76\u6ca1\u6709\u771f\u6b63\u201c\u7ec8\u7ed3\u201d\u3002\u76f4\u5230\u6240\u6709\u4efb\u52a1\u90fd\u6267\u884c\u5b8c\u6bd5\u4e86\uff0c\u8c03\u7528<\/span><code style=\"margin-right: 2px;margin-left: 2px;padding: 2px 4px;outline: 0px;font-size: 14px;border-radius: 4px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;\"><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">isTerminated()<\/span><\/code><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">\u65b9\u6cd5\u624d\u4f1a\u8fd4\u56de true\uff0c\u8fd9\u8868\u793a\u7ebf\u7a0b\u6c60\u5df2\u5173\u95ed\u5e76\u4e14\u7ebf\u7a0b\u6c60\u5185\u90e8\u662f\u7a7a\u7684\uff0c\u6240\u6709\u5269\u4f59\u7684\u4efb\u52a1\u90fd\u6267\u884c\u5b8c\u6bd5\u4e86\u3002<\/span><\/p>\n<h5 data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 30px;margin-bottom: 15px;outline: 0px;font-weight: bold;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &quot;PingFang SC&quot;, Cambria, Cochin, Georgia, Times, &quot;Times New Roman&quot;, serif;text-align: left;background-color: rgb(255, 255, 255);\"><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">awaitTermination()<\/span><\/h5>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;outline: 0px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &quot;PingFang SC&quot;, Cambria, Cochin, Georgia, Times, &quot;Times New Roman&quot;, serif;font-size: 16px;text-align: left;background-color: rgb(255, 255, 255);line-height: 26px;\"><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">\u7b2c\u56db\u4e2a\u65b9\u6cd5\u53eb\u4f5c<\/span><code style=\"margin-right: 2px;margin-left: 2px;padding: 2px 4px;outline: 0px;font-size: 14px;border-radius: 4px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;\"><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">awaitTermination()<\/span><\/code><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">\uff0c\u5b83\u672c\u8eab\u5e76\u4e0d\u662f\u7528\u6765\u5173\u95ed\u7ebf\u7a0b\u6c60\u7684\uff0c\u800c\u662f\u4e3b\u8981\u7528\u6765\u5224\u65ad\u7ebf\u7a0b\u6c60\u72b6\u6001\u7684\u3002\u6bd4\u5982\u6211\u4eec\u7ed9<\/span><code style=\"margin-right: 2px;margin-left: 2px;padding: 2px 4px;outline: 0px;font-size: 14px;border-radius: 4px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;\"><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">awaitTermination<\/span><\/code><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">\u65b9\u6cd5\u4f20\u5165\u7684\u53c2\u6570\u662f 10 \u79d2\uff0c\u90a3\u4e48\u5b83\u5c31\u4f1a\u9677\u5165 10 \u79d2\u949f\u7684\u7b49\u5f85\uff0c\u76f4\u5230\u53d1\u751f\u4ee5\u4e0b\u4e09\u79cd\u60c5\u51b5\u4e4b\u4e00\uff1a<\/span><\/p>\n<ul data-tool=\"mdnice\u7f16\u8f91\u5668\" class=\"list-paddingleft-1\" style=\"margin-top: 8px;margin-bottom: 8px;padding-left: 25px;outline: 0px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &quot;PingFang SC&quot;, Cambria, Cochin, Georgia, Times, &quot;Times New Roman&quot;, serif;font-size: 16px;text-align: left;background-color: rgb(255, 255, 255);\">\n<li style=\"outline: 0px;font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">\n<section style=\"margin-top: 5px;margin-bottom: 5px;outline: 0px;line-height: 26px;color: rgb(1, 1, 1);\"><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">\u7b49\u5f85\u671f\u95f4(\u5305\u62ec\u8fdb\u5165\u7b49\u5f85\u72b6\u6001\u4e4b\u524d)\u7ebf\u7a0b\u6c60\u5df2\u5173\u95ed\u5e76\u76ee\u6240\u6709\u5df2\u63d0\u4ea4\u7684\u4efb\u52a1(\u5305\u62ec\u6b63\u5728\u6267\u884c\u7684\u548c\u961f\u5217\u4e2d\u7b49\u5f85\u7684\u90fd\u6267\u884c\u5b8c\u6bd5,\u76f8\u5f53\u4e8e\u7ebf\u7a0b\u6c60\u5df2\u7ecf\u201c\u7ec8\u7ed3\u201d\u4e86,\u65b9\u6cd5\u4fbf\u4f1a\u8fd4\u56detrue<\/span><\/section>\n<\/li>\n<li style=\"outline: 0px;font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">\n<section style=\"margin-top: 5px;margin-bottom: 5px;outline: 0px;line-height: 26px;color: rgb(1, 1, 1);\"><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">\u7b49\u5f85\u8d85\u65f6\u65f6\u95f4\u5230\u540e,\u7b2c\u4e00\u79cd\u7ebf\u7a0b\u6c60\u201c\u7ec8\u7ed3\u201d\u7684\u60c5\u51b5\u59cb\u7ec8\u672a\u53d1\u751f,\u65b9\u6cd5\u8fd4\u56de false<\/span><\/section>\n<\/li>\n<li style=\"outline: 0px;\">\n<section style=\"margin-top: 5px;margin-bottom: 5px;outline: 0px;line-height: 26px;color: rgb(1, 1, 1);\"><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">\u7b49\u5f85\u671f\u95f4\u7ebf\u7a0b\u88ab\u4e2d\u65ad,\u65b9\u6cd5\u4f1a\u629b\u51fa<\/span><code style=\"margin-right: 2px;margin-left: 2px;padding: 2px 4px;outline: 0px;font-size: 14px;border-radius: 4px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;\"><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">Interruptedexception<\/span><\/code><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">\u5f02\u5e38<\/span><\/section>\n<\/li>\n<\/ul>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;outline: 0px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &quot;PingFang SC&quot;, Cambria, Cochin, Georgia, Times, &quot;Times New Roman&quot;, serif;font-size: 16px;text-align: left;background-color: rgb(255, 255, 255);line-height: 26px;\"><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">\u7b49\u5f85\u671f\u95f4\uff08\u5305\u62ec\u8fdb\u5165\u7b49\u5f85\u72b6\u6001\u4e4b\u524d\uff09\u7ebf\u7a0b\u6c60\u5df2\u5173\u95ed\u5e76\u4e14\u6240\u6709\u5df2\u63d0\u4ea4\u7684\u4efb\u52a1\uff08\u5305\u62ec\u6b63\u5728\u6267\u884c\u7684\u548c\u961f\u5217\u4e2d\u7b49\u5f85\u7684\uff09\u90fd\u6267\u884c\u5b8c\u6bd5\uff0c\u76f8\u5f53\u4e8e\u7ebf\u7a0b\u6c60\u5df2\u7ecf\u201c\u7ec8\u7ed3\u201d\u4e86\uff0c\u65b9\u6cd5\u4fbf\u4f1a\u8fd4\u56de true\uff1b<\/span><\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;outline: 0px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &quot;PingFang SC&quot;, Cambria, Cochin, Georgia, Times, &quot;Times New Roman&quot;, serif;font-size: 16px;text-align: left;background-color: rgb(255, 255, 255);line-height: 26px;\"><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">\u7b49\u5f85\u8d85\u65f6\u65f6\u95f4\u5230\u540e\uff0c\u7b2c\u4e00\u79cd\u7ebf\u7a0b\u6c60\u201c\u7ec8\u7ed3\u201d\u7684\u60c5\u51b5\u59cb\u7ec8\u672a\u53d1\u751f\uff0c\u65b9\u6cd5\u8fd4\u56de false\uff1b\u7b49\u5f85\u671f\u95f4\u7ebf\u7a0b\u88ab\u4e2d\u65ad\uff0c\u65b9\u6cd5\u4f1a\u629b\u51fa<\/span><code style=\"margin-right: 2px;margin-left: 2px;padding: 2px 4px;outline: 0px;font-size: 14px;border-radius: 4px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;\"><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">InterruptedException<\/span><\/code><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">\u5f02\u5e38\u3002<\/span><\/p>\n<h5 data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 30px;margin-bottom: 15px;outline: 0px;font-weight: bold;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &quot;PingFang SC&quot;, Cambria, Cochin, Georgia, Times, &quot;Times New Roman&quot;, serif;text-align: left;background-color: rgb(255, 255, 255);\"><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">shutdownNow()<\/span><\/h5>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;outline: 0px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &quot;PingFang SC&quot;, Cambria, Cochin, Georgia, Times, &quot;Times New Roman&quot;, serif;font-size: 16px;text-align: left;background-color: rgb(255, 255, 255);line-height: 26px;\"><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">\u6700\u540e\u4e00\u4e2a\u65b9\u6cd5\u662f<\/span><code style=\"margin-right: 2px;margin-left: 2px;padding: 2px 4px;outline: 0px;font-size: 14px;border-radius: 4px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;\"><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">shutdownNow()<\/span><\/code><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">\uff0c\u4e5f\u662f 5 \u79cd\u65b9\u6cd5\u91cc\u529f\u80fd\u6700\u5f3a\u5927\u7684\uff0c\u5b83\u4e0e\u7b2c\u4e00\u79cd<\/span><code style=\"margin-right: 2px;margin-left: 2px;padding: 2px 4px;outline: 0px;font-size: 14px;border-radius: 4px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;\"><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">shutdown<\/span><\/code><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">\u65b9\u6cd5\u4e0d\u540c\u4e4b\u5904\u5728\u4e8e\u540d\u5b57\u4e2d\u591a\u4e86\u4e00\u4e2a\u5355\u8bcd Now\uff0c\u4e5f\u5c31\u662f\u8868\u793a\u7acb\u523b\u5173\u95ed\u7684\u610f\u601d\u3002\u53c2\u8003\u8fd9\u91cc\uff1a<\/span><a target=\"_blank\" href=\"http:\/\/mp.weixin.qq.com\/s?__biz=MzI4Njc5NjM1NQ==&amp;mid=2247512128&amp;idx=1&amp;sn=48855172680fdede85cb30f3ca0d1dca&amp;chksm=ebd58f6cdca2067a877db35a0283496b96b8ac33a5b09e506625f4105465d9ced5e8a7bbb052&amp;scene=21#wechat_redirect\" textvalue=\"\u6b63\u786e\u5173\u95ed\u7ebf\u7a0b\u6c60\uff1ashutdown \u548c shutdownNow \u7684\u533a\u522b\" linktype=\"text\" imgurl=\"\" imgdata=\"null\" data-itemshowtype=\"0\" tab=\"innerlink\" data-linktype=\"2\" hasload=\"1\" style=\"outline: 0px;-webkit-tap-highlight-color: rgba(0, 0, 0, 0);cursor: pointer;font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\" rel=\"noopener\" rel=\"nofollow\" ><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">shutdown \u548c shutdownNow \u7684\u533a\u522b<\/span><\/a><\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;outline: 0px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &quot;PingFang SC&quot;, Cambria, Cochin, Georgia, Times, &quot;Times New Roman&quot;, serif;font-size: 16px;text-align: left;background-color: rgb(255, 255, 255);line-height: 26px;\"><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">\u5728\u6267\u884c<\/span><code style=\"margin-right: 2px;margin-left: 2px;padding: 2px 4px;outline: 0px;font-size: 14px;border-radius: 4px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;\"><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">shutdownNow<\/span><\/code><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">\u65b9\u6cd5\u4e4b\u540e\uff0c\u9996\u5148\u4f1a\u7ed9\u6240\u6709\u7ebf\u7a0b\u6c60\u4e2d\u7684\u7ebf\u7a0b\u53d1\u9001<\/span><code style=\"margin-right: 2px;margin-left: 2px;padding: 2px 4px;outline: 0px;font-size: 14px;border-radius: 4px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;\"><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">interrupt<\/span><\/code><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">\u4e2d\u65ad\u4fe1\u53f7\uff0c\u5c1d\u8bd5\u4e2d\u65ad\u8fd9\u4e9b\u4efb\u52a1\u7684\u6267\u884c\uff0c\u7136\u540e\u4f1a\u5c06\u4efb\u52a1\u961f\u5217\u4e2d\u6b63\u5728\u7b49\u5f85\u7684\u6240\u6709\u4efb\u52a1\u8f6c\u79fb\u5230\u4e00\u4e2a List \u4e2d\u5e76\u8fd4\u56de\uff0c\u6211\u4eec\u53ef\u4ee5\u6839\u636e\u8fd4\u56de\u7684\u4efb\u52a1 List \u6765\u8fdb\u884c\u4e00\u4e9b\u8865\u6551\u7684\u64cd\u4f5c\uff0c\u4f8b\u5982\u8bb0\u5f55\u5728\u6848\u5e76\u5728\u540e\u671f\u91cd\u8bd5\u3002<\/span><\/p>\n<pre data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 10px;margin-bottom: 10px;outline: 0px;color: rgb(0, 0, 0);font-size: 16px;text-align: left;background-color: rgb(255, 255, 255);\"><code style=\"padding: 16px;outline: 0px;overflow-x: auto;background: rgb(39, 40, 34);color: rgb(221, 221, 221);display: -webkit-box;font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;border-radius: 0px;font-size: 12px;\"><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\"><span style=\"outline: 0px;line-height: 26px;\"><span style=\"outline: 0px;color: rgb(249, 38, 114);font-weight: bold;line-height: 26px;\">public<\/span>List&lt;Runnable&gt;<span style=\"outline: 0px;color: rgb(166, 226, 46);font-weight: bold;line-height: 26px;\">shutdownNow<\/span><span style=\"outline: 0px;line-height: 26px;\">()<\/span><\/span>{List&lt;Runnable&gt;tasks;<span style=\"outline: 0px;color: rgb(249, 38, 114);font-weight: bold;line-height: 26px;\">final<\/span>ReentrantLockmainLock=<span style=\"outline: 0px;color: rgb(249, 38, 114);font-weight: bold;line-height: 26px;\">this<\/span>.mainLock;mainLock.lock();<span style=\"outline: 0px;color: rgb(249, 38, 114);font-weight: bold;line-height: 26px;\">try<\/span>{checkShutdownAccess();advanceRunState(STOP);interruptWorkers();tasks=drainQueue();}<span style=\"outline: 0px;color: rgb(249, 38, 114);font-weight: bold;line-height: 26px;\">finally<\/span>{mainLock.unlock();}tryTerminate();<span style=\"outline: 0px;color: rgb(249, 38, 114);font-weight: bold;line-height: 26px;\">return<\/span>tasks;}<\/span><\/code><\/pre>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;outline: 0px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &quot;PingFang SC&quot;, Cambria, Cochin, Georgia, Times, &quot;Times New Roman&quot;, serif;font-size: 16px;text-align: left;background-color: rgb(255, 255, 255);line-height: 26px;\"><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">\u6e90\u7801\u4e2d\u6709\u4e00\u884c<\/span><code style=\"margin-right: 2px;margin-left: 2px;padding: 2px 4px;outline: 0px;font-size: 14px;border-radius: 4px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;\"><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">interruptWorkers()<\/span><\/code><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">\u4ee3\u7801\uff0c\u8fd9\u884c\u4ee3\u7801\u4f1a\u8ba9\u6bcf\u4e00\u4e2a\u5df2\u7ecf\u542f\u52a8\u7684\u7ebf\u7a0b\u90fd\u4e2d\u65ad\uff0c\u8fd9\u6837\u7ebf\u7a0b\u5c31\u53ef\u4ee5\u5728\u6267\u884c\u4efb\u52a1\u671f\u95f4\u68c0\u6d4b\u5230\u4e2d\u65ad\u4fe1\u53f7\u5e76\u8fdb\u884c\u76f8\u5e94\u7684\u5904\u7406\uff0c\u63d0\u524d\u7ed3\u675f\u4efb\u52a1\u3002<\/span><\/p>\n<blockquote data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 20px;margin-bottom: 20px;padding: 10px 10px 10px 20px;outline: 0px;border-left-color: rgba(0, 0, 0, 0.4);color: rgb(106, 115, 125);font-size: 0.9em;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &quot;PingFang SC&quot;, Cambria, Cochin, Georgia, Times, &quot;Times New Roman&quot;, serif;text-align: left;border-top: none;border-right: none;border-bottom: none;overflow: auto;background: rgba(0, 0, 0, 0.05);\">\n<p style=\"padding-top: 8px;padding-bottom: 8px;outline: 0px;font-size: 16px;color: black;line-height: 26px;\"><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">\u8fd9\u91cc\u9700\u8981\u6ce8\u610f\u7684\u662f\uff0c\u7531\u4e8e Java \u4e2d\u4e0d\u63a8\u8350\u5f3a\u884c\u505c\u6b62\u7ebf\u7a0b\u7684\u673a\u5236\u7684\u9650\u5236\uff0c\u5373\u4fbf\u6211\u4eec\u8c03\u7528\u4e86<\/span><code style=\"margin-right: 2px;margin-left: 2px;padding: 2px 4px;outline: 0px;font-size: 14px;border-radius: 4px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;\"><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">shutdownNow<\/span><\/code><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">\u65b9\u6cd5\uff0c\u5982\u679c\u88ab\u4e2d\u65ad\u7684\u7ebf\u7a0b\u5bf9\u4e8e\u4e2d\u65ad\u4fe1\u53f7\u4e0d\u7406\u4e0d\u776c\uff0c\u90a3\u4e48\u4f9d\u7136\u6709\u53ef\u80fd\u5bfc\u81f4\u4efb\u52a1\u4e0d\u4f1a\u505c\u6b62\u3002<\/span><\/p>\n<\/blockquote>\n<h3 data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 30px;margin-bottom: 15px;outline: 0px;font-weight: bold;font-size: 20px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &quot;PingFang SC&quot;, Cambria, Cochin, Georgia, Times, &quot;Times New Roman&quot;, serif;text-align: left;background-color: rgb(255, 255, 255);\"><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">\u603b\u7ed3<\/span><\/h3>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;outline: 0px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &quot;PingFang SC&quot;, Cambria, Cochin, Georgia, Times, &quot;Times New Roman&quot;, serif;font-size: 16px;text-align: left;background-color: rgb(255, 255, 255);line-height: 26px;\"><span style=\"font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">\u4e2d\u65ad\u548c\u5173\u95ed\u7ebf\u7a0b\u7684\u65b9\u5f0f\u4e94\u82b1\u516b\u95e8\uff0c\u770b\u8d77\u6765\u5f88\u76f8\u4f3c\uff0c\u5176\u5b9e\u91cc\u5934\u5927\u6709\u95e8\u9053\u3002\u5904\u7406\u4e0d\u597d\uff0c\u53ef\u662f\u4f1a\u5bfc\u81f4\u7a0b\u5e8f\u5d29\u6e83\u7684\u3002<\/span><\/p>\n<section class=\"mp_profile_iframe_wrp\"><mp-common-profile class=\"js_uneditable custom_select_card mp_profile_iframe\" data-pluginname=\"mpprofile\" data-id=\"MzIwNjg4MzY4NA==\" data-headimg=\"http:\/\/mmbiz.qpic.cn\/mmbiz_png\/x0kXIOa6owURbBxemzQyQibDwXyic5Ow5cWU9S4aVnOfu7MLneQq36qB7rfJ90MJ9cibibULaDvWx0jqe2eWz0Niceg\/0?wx_fmt=png\" data-nickname=\"\u7a0b\u5e8f\u5458\u8ffd\u98ce\" data-alias=\"\" data-signature=\"\u4e13\u6ce8\u4e8e\u5206\u4eabJava\u5404\u7c7b\u5b66\u4e60\u7b14\u8bb0\u3001\u9762\u8bd5\u9898\u4ee5\u53caIT\u7c7b\u8d44\u8baf\u3002\" data-from=\"0\" data-is_biz_ban=\"0\"><\/mp-common-profile><\/section>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\">\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"text-align: right;\"><img decoding=\"async\" class=\"rich_pages wxw-img lazyload\" data-croporidata-src=\"https:\/\/mmbiz.qlogo.cn\/mmbiz_jpg\/xe4FY1hGDmq17JSGmvlibgJjT73DIFV5hNpPbbL7bDtKBKyOka9bl1LLiam25MusZplIsuk5l0zQW2Pg1WhvCRJw\/?wx_fmt=jpeg\" src=\"https:\/\/s.nmxc.ltd\/sakurairo_vision\/@2.6\/load_svg\/inload.svg\" onerror=\"imgError(this)\" data-cropx1=\"0\" data-cropx2=\"193\" data-cropy1=\"63\" data-cropy2=\"246\" data-fileid=\"100014145\" data-ratio=\"0.9583333333333334\"  data-type=\"jpeg\" data-w=\"192\" style=\"outline: 0px;text-align: right;white-space: normal;widows: 1;background-color: rgb(255, 255, 255);color: rgb(62, 62, 62);font-size: 15px;word-spacing: 2px;caret-color: rgb(255, 0, 0);font-family: Optima-Regular, PingFangTC-light;letter-spacing: 1.5px;display: initial;box-sizing: border-box !important;overflow-wrap: break-word !important;visibility: visible !important;width: 67.6875px !important;\" width=\"67.6875px\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801220020673.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-croporisrc=\"https:\/\/mmbiz.qlogo.cn\/mmbiz_jpg\/xe4FY1hGDmq17JSGmvlibgJjT73DIFV5hNpPbbL7bDtKBKyOka9bl1LLiam25MusZplIsuk5l0zQW2Pg1WhvCRJw\/?wx_fmt=jpeg\" data-cropx1=\"0\" data-cropx2=\"193\" data-cropy1=\"63\" data-cropy2=\"246\" data-fileid=\"100014145\" data-ratio=\"0.9583333333333334\"  data-type=\"jpeg\" data-w=\"192\" style=\"outline: 0px;text-align: right;white-space: normal;widows: 1;background-color: rgb(255, 255, 255);color: rgb(62, 62, 62);font-size: 15px;word-spacing: 2px;caret-color: rgb(255, 0, 0);font-family: Optima-Regular, PingFangTC-light;letter-spacing: 1.5px;display: initial;box-sizing: border-box !important;overflow-wrap: break-word !important;visibility: visible !important;width: 67.6875px !important;\" width=\"67.6875px\" src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801220020673.jpeg\"  \/><\/noscript><span style=\"outline: 0px;max-width: 100%;letter-spacing: 0.544px;text-align: right;color: rgb(0, 0, 0);caret-color: rgb(51, 51, 51);font-size: 16px;widows: 1;word-spacing: 1px;white-space: pre-wrap;background-color: rgb(255, 255, 255);font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;box-sizing: border-box !important;overflow-wrap: break-word !important;\"><span style=\"text-align: right;color: rgb(0, 0, 0);widows: 1;white-space: pre-wrap;background-color: rgb(255, 255, 255);font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;outline: 0px;max-width: 100%;font-size: 15px;word-spacing: 2px;caret-color: rgb(255, 0, 0);letter-spacing: 1.5px;\"><\/span><strong style=\"outline: 0px;max-width: 100%;color: rgb(62, 62, 62);font-size: 15px;word-spacing: 2px;caret-color: rgb(255, 0, 0);font-family: Optima-Regular, PingFangTC-light;letter-spacing: 1.5px;box-sizing: border-box !important;overflow-wrap: break-word !important;\"><span style=\"text-align: right;widows: 1;white-space: pre-wrap;background-color: rgb(255, 255, 255);outline: 0px;max-width: 100%;font-weight: 400;letter-spacing: 0.544px;word-spacing: 1px;caret-color: rgb(51, 51, 51);font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 18px;color: rgb(0, 0, 0);box-sizing: border-box !important;overflow-wrap: break-word !important;\">\u4f60\u5728\u770b\u5417<\/span><\/strong><\/span><\/p>\n<blockquote>\n<p>\u672c\u7bc7\u6587\u7ae0\u6765\u6e90\u4e8e\u5fae\u4fe1\u516c\u4f17\u53f7:                 \u7a0b\u5e8f\u5458\u8ffd\u98ce              <\/p>\n<\/blockquote>\n<\/div>\n","raw":"","protected":false},"excerpt":{"rendered":"<p>\u4e0a\u65b9\u84dd\u8272\u201c\u7a0b\u5e8f\u5458\u8ffd\u98ce\u201d\uff0c\u9009\u62e9\u201c\u8bbe\u4e3a\u661f\u6807\u201d\u56de\u590d\u201c\u8d44\u6599\u201d\u83b7\u53d6\u6574\u7406\u597d\u7684\u9762\u8bd5\u8d44\u6599\u539f\u6587\uff1ablog.csdn.net\/weixin_29729 &#8230;<\/p>\n","protected":false},"author":1,"featured_media":5225,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"emotion":"","emotion_color":"","title_style":"","license":"","footnotes":""},"categories":[30],"tags":[],"class_list":["post-5230","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-30"],"post_thumbnail_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801220014960-150x150.jpeg","content_first_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801220018905.png","post_medium_image_300":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801220014960.jpeg","post_thumbnail_image_624":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801220014960.jpeg","post_frist_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801220018905.png","post_medium_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801220014960.jpeg","post_large_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801220014960.jpeg","post_full_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801220014960.jpeg","post_all_images":[{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801220018905.png","id":"image0"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801220018905.png","id":"image1"},{"imagesurl":"https:\/\/mmbiz.qlogo.cn\/mmbiz_jpg\/xe4FY1hGDmq17JSGmvlibgJjT73DIFV5hNpPbbL7bDtKBKyOka9bl1LLiam25MusZplIsuk5l0zQW2Pg1WhvCRJw\/?wx_fmt=jpeg","id":"image2"},{"imagesurl":"https:\/\/mmbiz.qlogo.cn\/mmbiz_jpg\/xe4FY1hGDmq17JSGmvlibgJjT73DIFV5hNpPbbL7bDtKBKyOka9bl1LLiam25MusZplIsuk5l0zQW2Pg1WhvCRJw\/?wx_fmt=jpeg","id":"image3"}],"videoAdId":"","listAd":"0","listAdId":"","listAdEvery":6,"total_comments":0,"category_name":"\u9762\u8bd5","post_date":"2024-08-01","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":1081,"next_post_id":null,"next_post_title":null,"previous_post_id":4850,"previous_post_title":"\u9762\u8bd5\u5b98\u542c\u5230\u6211\u5bf9 explain \u4f7f\u7528\u7684\u56de\u7b54\u7ad6\u8d77\u4e86\u5927\u62c7\u6307","_links":{"self":[{"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/posts\/5230","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=5230"}],"version-history":[{"count":1,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/posts\/5230\/revisions"}],"predecessor-version":[{"id":6368,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/posts\/5230\/revisions\/6368"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/media\/5225"}],"wp:attachment":[{"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/media?parent=5230"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/categories?post=5230"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/tags?post=5230"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}