{"id":4302,"date":"2020-05-06T20:10:21","date_gmt":"2020-05-06T12:10:21","guid":{"rendered":"https:\/\/damogame.cn\/wordpress\/?p=4302"},"modified":"2020-05-06T20:10:21","modified_gmt":"2020-05-06T12:10:21","slug":"%e6%97%a0%e9%94%81%e6%9c%89%e5%ba%8f%e9%93%be%e8%a1%a8%e7%9a%84%e5%ae%9e%e7%8e%b0","status":"publish","type":"post","link":"https:\/\/i007.cc\/wordpress\/archives\/4302","title":{"rendered":"\u65e0\u9501\u6709\u5e8f\u94fe\u8868\u7684\u5b9e\u73b0"},"content":{"rendered":"<h3 class=\"title\"><a href=\"http:\/\/ifeve.com\/lock-free-linked-list\/\">\u539f\u6587\u5730\u5740<\/a><\/h3>\n<p>&nbsp;<\/p>\n<div class=\"post_content\">\n<div class=\"entry-content\">\n<p>\u611f\u8c22\u540c\u4e8b\u3010<a href=\"http:\/\/codemacro.com\/\" target=\"_blank\" rel=\"noopener noreferrer\">kevinlynx<\/a>\u3011\u5728\u672c\u7ad9\u53d1\u8868\u6b64\u6587<\/p>\n<p>\u65e0\u9501\u6709\u5e8f\u94fe\u8868\u53ef\u4ee5\u4fdd\u8bc1\u5143\u7d20\u7684\u552f\u4e00\u6027\uff0c\u4f7f\u5176\u53ef\u7528\u4e8e\u54c8\u5e0c\u8868\u7684\u6876\uff0c\u751a\u81f3\u76f4\u63a5\u4f5c\u4e3a\u4e00\u4e2a\u6548\u7387\u4e0d\u90a3\u4e48\u9ad8\u7684map\u3002\u666e\u901a\u94fe\u8868\u7684\u65e0\u9501\u5b9e\u73b0\u76f8\u5bf9\u7b80\u5355\u70b9\uff0c\u56e0\u4e3a\u63d2\u5165\u5143\u7d20\u53ef\u4ee5\u5728\u8868\u5934\u63d2\uff0c\u800c\u6709\u5e8f\u94fe\u8868\u7684\u63d2\u5165\u5219\u662f\u4efb\u610f\u4f4d\u7f6e\u3002<\/p>\n<p>\u672c\u6587\u4e3b\u8981\u57fa\u4e8e\u8bba\u6587<a href=\"http:\/\/www.research.ibm.com\/people\/m\/michael\/spaa-2002.pdf\" target=\"_blank\" rel=\"noopener noreferrer\">High Performance Dynamic Lock-Free Hash Tables<\/a>\u5b9e\u73b0\u3002<br \/>\n<span id=\"more-19492\"><\/span><\/p>\n<p>&nbsp;<\/p>\n<h2>\u4e3b\u8981\u95ee\u9898<\/h2>\n<p>\u94fe\u8868\u7684\u4e3b\u8981\u64cd\u4f5c\u5305\u542b<code>insert<\/code>\u548c<code>remove<\/code>\uff0c\u5148\u7b80\u5355\u5b9e\u73b0\u4e00\u4e2a\u7248\u672c\uff0c\u5c31\u4f1a\u770b\u5230\u95ee\u9898\u6240\u5728\uff0c\u4ee5\u4e0b\u4ee3\u7801\u53ea\u7528\u4f5c\u793a\u4f8b\uff1a<\/p>\n<div class=\"highlight\">\n<pre class=\"cpp\">struct node_t {\r\n        key_t key;\r\n        value_t val;\r\n        node_t *next;\r\n    };\r\n\r\n    int l_find(node_t **pred_ptr, node_t **item_ptr, node_t *head, key_t key) {\r\n        node_t *pred = head;\r\n        node_t *item = head-&gt;next;\r\n        while (item) {\r\n            int d = KEY_CMP(item-&gt;key, key);\r\n            if (d &gt;= 0) {\r\n                *pred_ptr = pred;\r\n                *item_ptr = item;\r\n                return d == 0 ? TRUE : FALSE;\r\n            }\r\n            pred = item;\r\n            item = item-&gt;next;\r\n        } \r\n        *pred_ptr = pred;\r\n        *item_ptr = NULL;\r\n        return FALSE;\r\n    }\r\n\r\n    int l_insert(node_t *head, key_t key, value_t val) {\r\n        node_t *pred, *item, *new_item;\r\n        while (TRUE) {\r\n            if (l_find(&amp;pred, &amp;item, head, key)) {\r\n                return FALSE;\r\n            }\r\n            new_item = (node_t*) malloc(sizeof(node_t));\r\n            new_item-&gt;key = key;\r\n            new_item-&gt;val = val;\r\n            new_item-&gt;next = item;\r\n            \/\/ A. \u5982\u679cpred\u672c\u8eab\u88ab\u79fb\u9664\u4e86\r\n            if (CAS(&amp;pred-&gt;next, item, new_item)) {\r\n                return TRUE;\r\n            }\r\n            free(new_item);\r\n        }\r\n    }\r\n\r\n    int l_remove(node_t *head, key_t key) {\r\n        node_t *pred, *item;\r\n        while (TRUE) {\r\n            if (!l_find(&amp;pred, &amp;item, head, key)) {\r\n                return TRUE;\r\n            }\r\n            \/\/ B. \u5982\u679cpred\u88ab\u79fb\u9664\uff1b\u5982\u679citem\u4e5f\u88ab\u79fb\u9664\r\n            if (CAS(&amp;pred-&gt;next, item, item-&gt;next)) {\r\n                haz_free(item);\r\n                return TRUE;\r\n            }\r\n        }\r\n    }<\/pre>\n<\/div>\n<p><code>l_find<\/code>\u51fd\u6570\u8fd4\u56de\u67e5\u627e\u5230\u7684\u524d\u5e8f\u5143\u7d20\u548c\u5143\u7d20\u672c\u8eab\uff0c\u4ee3\u7801A\u548cB\u867d\u7136\u62ff\u5230\u4e86<code>pred<\/code>\u548c<code>item<\/code>\uff0c\u4f46\u5728<code>CAS<\/code>\u7684\u65f6\u5019\uff0c\u5176\u53ef\u80fd\u88ab\u5176\u4ed6\u7ebf\u7a0b\u79fb\u9664\u3002\u751a\u81f3\uff0c\u5728<code>l_find<\/code>\u8fc7\u7a0b\u4e2d\uff0c\u5176\u6bcf\u4e00\u4e2a\u5143\u7d20\u90fd\u53ef\u80fd\u88ab\u79fb\u9664\u3002\u95ee\u9898\u5728\u4e8e\uff0c<strong>\u4efb\u4f55\u65f6\u5019\u62ff\u5230\u4e00\u4e2a\u5143\u7d20\u65f6\uff0c\u90fd\u4e0d\u786e\u5b9a\u5176\u662f\u5426\u8fd8\u6709\u6548<\/strong>\u3002\u5143\u7d20\u7684\u6709\u6548\u6027\u5305\u62ec\u5176\u662f\u5426\u8fd8\u5728\u94fe\u8868\u4e2d\uff0c\u5176\u6307\u5411\u7684\u5185\u5b58\u662f\u5426\u8fd8\u6709\u6548\u3002<\/p>\n<h2>\u89e3\u51b3\u65b9\u6848<\/h2>\n<p><strong>\u901a\u8fc7\u4e3a\u5143\u7d20\u6307\u9488\u589e\u52a0\u4e00\u4e2a\u6709\u6548\u6027\u6807\u5fd7\u4f4d\uff0c\u914d\u5408CAS\u64cd\u4f5c\u7684\u4e92\u65a5\u6027<\/strong>\uff0c\u5c31\u53ef\u4ee5\u89e3\u51b3\u5143\u7d20\u6709\u6548\u6027\u5224\u5b9a\u95ee\u9898\u3002<\/p>\n<p>\u56e0\u4e3a<code>node_t<\/code>\u653e\u5728\u5185\u5b58\u4e2d\u662f\u4f1a\u5bf9\u9f50\u7684\uff0c\u6240\u4ee5\u6307\u5411<code>node_t<\/code>\u7684\u6307\u9488\u503c\u4f4e\u51e0\u4f4d\u662f\u4e0d\u4f1a\u7528\u5230\u7684\uff0c\u4ece\u800c\u53ef\u4ee5\u5728\u4f4e\u51e0\u4f4d\u91cc\u8bbe\u7f6e\u6807\u5fd7\uff0c\u8fd9\u6837\u5728\u505aCAS\u7684\u65f6\u5019\uff0c\u5c31\u5b9e\u73b0\u4e86DCAS\u7684\u6548\u679c\uff0c\u76f8\u5f53\u4e8e\u5c06\u4e24\u4e2a\u903b\u8f91\u4e0a\u7684\u64cd\u4f5c\u53d8\u6210\u4e86\u4e00\u4e2a\u539f\u5b50\u64cd\u4f5c\u3002\u60f3\u8c61\u4e0b\u5f15\u7528\u8ba1\u6570\u5bf9\u8c61\u7684\u7ebf\u7a0b\u5b89\u5168\u6027\uff0c\u5176\u5185\u5305\u88c5\u7684\u6307\u9488\u662f\u7ebf\u7a0b\u5b89\u5168\u7684\uff0c\u4f46\u5bf9\u8c61\u672c\u8eab\u4e0d\u662f\u3002<\/p>\n<p>CAS\u7684\u4e92\u65a5\u6027\uff0c\u5728\u82e5\u5e72\u4e2a\u7ebf\u7a0bCAS\u76f8\u540c\u7684\u5bf9\u8c61\u65f6\uff0c\u53ea\u6709\u4e00\u4e2a\u7ebf\u7a0b\u4f1a\u6210\u529f\uff0c\u5931\u8d25\u7684\u7ebf\u7a0b\u5c31\u53ef\u4ee5\u4ee5\u6b64\u5224\u5b9a\u76ee\u6807\u5bf9\u8c61\u53d1\u751f\u4e86\u53d8\u66f4\u3002\u6539\u8fdb\u540e\u7684\u4ee3\u7801\uff08\u4ee3\u7801\u4ec5\u505a\u793a\u4f8b\u7528\uff0c\u4e0d\u4fdd\u8bc1\u6b63\u786e\uff09\uff1a<\/p>\n<div class=\"highlight\">\n<pre class=\"cpp\">typedef size_t markable_t;\r\n    \/\/ \u6700\u4f4e\u4f4d\u7f6e1\uff0c\u8868\u793a\u5143\u7d20\u88ab\u5220\u9664\r\n    #define HAS_MARK(p) ((markable_t)p &amp; 0x01)\r\n    #define MARK(p) ((markable_t)p | 0x01)\r\n    #define STRIP_MARK(p) ((markable_t)p &amp; ~0x01)\r\n\r\n    int l_insert(node_t *head, key_t key, value_t val) {\r\n        node_t *pred, *item, *new_item;\r\n        while (TRUE) {\r\n            if (l_find(&amp;pred, &amp;item, head, key)) { \r\n                return FALSE;\r\n            }\r\n            new_item = (node_t*) malloc(sizeof(node_t));\r\n            new_item-&gt;key = key;\r\n            new_item-&gt;val = val;\r\n            new_item-&gt;next = item;\r\n            \/\/ A. \u867d\u7136find\u62ff\u5230\u4e86\u5408\u6cd5\u7684pred\uff0c\u4f46\u662f\u5728\u4ee5\u4e0b\u4ee3\u7801\u4e4b\u524dpred\u53ef\u80fd\u88ab\u5220\u9664\uff0c\u6b64\u65f6pred-&gt;next\u88ab\u6807\u8bb0\r\n            \/\/    pred-&gt;next != item\uff0c\u8be5CAS\u4f1a\u5931\u8d25\uff0c\u5931\u8d25\u540e\u91cd\u8bd5\r\n            if (CAS(&amp;pred-&gt;next, item, new_item)) {\r\n                return TRUE;\r\n            }\r\n            free(new_item);\r\n        }\r\n        return FALSE;\r\n    }\r\n\r\n    int l_remove(node_t *head, key_t key) {\r\n        node_t *pred, *item;\r\n        while (TRUE) {\r\n            if (!l_find(&amp;pred, &amp;item, head, key)) {\r\n                return FALSE;\r\n            }\r\n            node_t *inext = item-&gt;next;\r\n            \/\/ B. \u5220\u9664item\u524d\u5148\u6807\u8bb0item-&gt;next\uff0c\u5982\u679cCAS\u5931\u8d25\uff0c\u90a3\u4e48\u60c5\u51b5\u540cinsert\u4e00\u6837\uff0c\u6709\u5176\u4ed6\u7ebf\u7a0b\u5728find\u4e4b\u540e\r\n            \/\/    \u5220\u9664\u4e86item\uff0c\u5931\u8d25\u540e\u91cd\u8bd5\r\n            if (!CAS(&amp;item-&gt;next, inext, MARK(inext))) {\r\n                continue;\r\n            }\r\n            \/\/ C. \u5bf9\u540c\u4e00\u4e2a\u5143\u7d20item\u5220\u9664\u65f6\uff0c\u53ea\u4f1a\u6709\u4e00\u4e2a\u7ebf\u7a0b\u6210\u529f\u8d70\u5230\u8fd9\u91cc\r\n            if (CAS(&amp;pred-&gt;next, item, STRIP_MARK(item-&gt;next))) {\r\n                haz_defer_free(item);\r\n                return TRUE;\r\n            }\r\n        }\r\n        return FALSE;\r\n    }\r\n\r\n    int l_find(node_t **pred_ptr, node_t **item_ptr, node_t *head, key_t key) {\r\n        node_t *pred = head;\r\n        node_t *item = head-&gt;next;\r\n        hazard_t *hp1 = haz_get(0);\r\n        hazard_t *hp2 = haz_get(1);\r\n        while (item) {\r\n            haz_set_ptr(hp1, pred);\r\n            haz_set_ptr(hp2, item);\r\n            \/* \r\n             \u5982\u679c\u5df2\u88ab\u6807\u8bb0\uff0c\u90a3\u4e48\u7d27\u63a5\u7740item\u53ef\u80fd\u88ab\u79fb\u9664\u94fe\u8868\u751a\u81f3\u91ca\u653e\uff0c\u6240\u4ee5\u9700\u8981\u91cd\u5934\u67e5\u627e\r\n            *\/\r\n            if (HAS_MARK(item-&gt;next)) { \r\n                return l_find(pred_ptr, item_ptr, head, key);\r\n            }\r\n            int d = KEY_CMP(item-&gt;key, key);\r\n            if (d &gt;= 0) {\r\n                *pred_ptr = pred;\r\n                *item_ptr = item;\r\n                return d == 0 ? TRUE : FALSE;\r\n            }\r\n            pred = item;\r\n            item = item-&gt;next;\r\n        } \r\n        *pred_ptr = pred;\r\n        *item_ptr = NULL;\r\n        return FALSE;\r\n    }<\/pre>\n<\/div>\n<p><code>haz_get<\/code>\u3001<code>haz_set_ptr<\/code>\u4e4b\u7c7b\u7684\u51fd\u6570\u662f\u4e00\u4e2ahazard pointer\u5b9e\u73b0\uff0c\u7528\u4e8e\u652f\u6301\u591a\u7ebf\u7a0b\u4e0b\u5185\u5b58\u7684GC\u3002\u4e0a\u9762\u7684\u4ee3\u7801\u4e2d\uff0c\u8981\u5220\u9664\u4e00\u4e2a\u5143\u7d20<code>item<\/code>\u65f6\uff0c\u4f1a\u6807\u8bb0<code>item-&gt;next<\/code>\uff0c\u4ece\u800c\u4f7f\u5f97<code>insert<\/code>\u65f6\u4e2d\u90a3\u4e2a<code>CAS<\/code>\u4e0d\u9700\u8981\u505a\u4efb\u4f55\u8c03\u6574\u3002\u603b\u7ed3\u4e0b\u8fd9\u91cc\u7684\u7ebf\u7a0b\u7ade\u4e89\u60c5\u51b5\uff1a<\/p>\n<ul>\n<li><code>insert<\/code>\u4e2d<code>find<\/code>\u5230\u6b63\u5e38\u7684<code>pred<\/code>\u53ca<code>item<\/code>\uff0c<code>pred-&gt;next == item<\/code>\uff0c\u7136\u540e\u5728<code>CAS<\/code>\u524d\u6709\u7ebf\u7a0b\u5220\u9664\u4e86<code>pred<\/code>\uff0c\u6b64\u65f6<code>pred-&gt;next == MARK(item)<\/code>\uff0c<code>CAS<\/code>\u5931\u8d25\uff0c\u91cd\u8bd5\uff1b\u5220\u9664\u5206\u4e3a2\u79cd\u60c5\u51b5\uff1aa) \u4ece\u94fe\u8868\u79fb\u9664\uff0c\u5f97\u5230\u6807\u8bb0\uff0c<code>pred<\/code>\u53ef\u7ee7\u7eed\u8bbf\u95ee\uff1bb)<code>pred<\/code>\u53ef\u80fd\u88ab\u91ca\u653e\u5185\u5b58\uff0c\u6b64\u65f6\u518d\u4f7f\u7528<code>pred<\/code>\u4f1a\u9519\u8bef\u3002\u4e3a\u4e86\u5904\u7406\u60c5\u51b5b\uff0c\u6240\u4ee5\u5f15\u5165\u4e86\u7c7b\u4f3chazard pointer\u7684\u673a\u5236\uff0c\u53ef\u4ee5\u6709\u6548\u4fdd\u969c\u4efb\u610f\u4e00\u4e2a\u6307\u9488<code>p<\/code>\u53ea\u8981\u8fd8\u6709\u7ebf\u7a0b\u5728\u4f7f\u7528\u5b83\uff0c\u5b83\u7684\u5185\u5b58\u5c31\u4e0d\u4f1a\u88ab\u771f\u6b63\u91ca\u653e<\/li>\n<li><code>insert<\/code>\u4e2d\u6709\u591a\u4e2a\u7ebf\u7a0b\u5728<code>pred<\/code>\u540e\u63d2\u5165\u5143\u7d20\uff0c\u6b64\u65f6\u540c\u6837\u7531<code>insert<\/code>\u4e2d\u7684<code>CAS<\/code>\u4fdd\u8bc1\uff0c\u8fd9\u4e2a\u4e0d\u591a\u8bf4<\/li>\n<li><code>remove<\/code>\u4e2d\u60c5\u51b5\u540c<code>insert<\/code>\uff0c<code>find<\/code>\u62ff\u5230\u4e86\u6709\u6548\u7684<code>pred<\/code>\u548c<code>next<\/code>\uff0c\u4f46\u5728<code>CAS<\/code>\u7684\u65f6\u5019<code>pred<\/code>\u88ab\u5176\u4ed6\u7ebf\u7a0b\u5220\u9664\uff0c\u6b64\u65f6\u60c5\u51b5\u540c<code>insert<\/code>\uff0c<code>CAS<\/code>\u5931\u8d25\uff0c\u91cd\u8bd5<\/li>\n<li>\u4efb\u4f55\u65f6\u5019\u6539\u53d8\u94fe\u8868\u7ed3\u6784\u65f6\uff0c\u65e0\u8bba\u662f<code>remove<\/code>\u8fd8\u662f<code>insert<\/code>\uff0c\u90fd\u9700\u8981\u91cd\u8bd5\u8be5\u64cd\u4f5c<\/li>\n<li><code>find<\/code>\u4e2d\u904d\u5386\u65f6\uff0c\u53ef\u80fd\u4f1a\u9047\u5230\u88ab\u6807\u8bb0\u5220\u9664\u7684<code>item<\/code>\uff0c\u6b64\u65f6<code>item<\/code>\u6839\u636e<code>remove<\/code>\u7684\u5b9e\u73b0\u5f88\u53ef\u80fd\u88ab\u5220\u9664\uff0c\u6240\u4ee5\u9700\u8981\u91cd\u5934\u5f00\u59cb\u904d\u5386<\/li>\n<\/ul>\n<h2>ABA\u95ee\u9898<\/h2>\n<p>ABA\u95ee\u9898\u8fd8\u662f\u5b58\u5728\u7684\uff0c<code>insert<\/code>\u4e2d\uff1a<\/p>\n<div class=\"highlight\">\n<pre class=\"cpp\">if (CAS(&amp;pred-&gt;next, item, new_item)) {\r\n        return TRUE;\r\n    }<\/pre>\n<\/div>\n<p>\u5982\u679c<code>CAS<\/code>\u4e4b\u524d\uff0c<code>pred<\/code>\u540e\u7684<code>item<\/code>\u88ab\u79fb\u9664\uff0c\u53c8\u4ee5\u76f8\u540c\u7684\u5730\u5740\u503c\u52a0\u8fdb\u6765\uff0c\u4f46\u5176value\u53d8\u4e86\uff0c\u6b64\u65f6<code>CAS<\/code>\u4f1a\u6210\u529f\uff0c\u4f46\u94fe\u8868\u53ef\u80fd\u5c31\u4e0d\u662f\u6709\u5e8f\u7684\u4e86\u3002<code>pred-&gt;val &lt; new_item-&gt;val &gt; item-&gt;val<\/code><\/p>\n<p>\u4e3a\u4e86\u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898\uff0c\u53ef\u4ee5\u5229\u7528\u6307\u9488\u503c\u5730\u5740\u5bf9\u9f50\u7684\u5176\u4ed6\u4f4d\u6765\u5b58\u50a8\u4e00\u4e2a\u8ba1\u6570\uff0c\u7528\u4e8e\u8868\u793a<code>pred-&gt;next<\/code>\u7684\u6539\u53d8\u6b21\u6570\u3002\u5f53<code>insert<\/code>\u62ff\u5230<code>pred<\/code>\u65f6\uff0c<code>pred-&gt;next<\/code>\u4e2d\u5b58\u50a8\u7684\u8ba1\u6570\u5047\u8bbe\u662f0\uff0c<code>CAS<\/code>\u4e4b\u524d\u5176\u4ed6\u7ebf\u7a0b\u79fb\u9664\u4e86<code>pred-&gt;next<\/code>\u53c8\u65b0\u589e\u56de\u4e86<code>item<\/code>\uff0c\u6b64\u65f6<code>pred-&gt;next<\/code>\u4e2d\u7684\u8ba1\u6570\u589e\u52a0\uff0c\u4ece\u800c\u5bfc\u81f4<code>insert<\/code>\u4e2d<code>CAS<\/code>\u5931\u8d25\u3002<\/p>\n<div class=\"highlight\">\n<pre class=\"cpp\">\/\/ \u6700\u4f4e\u4f4d\u7559\u4f5c\u5220\u9664\u6807\u5fd7\r\n    #define MASK ((sizeof(node_t) - 1) &amp; ~0x01)\r\n\r\n    #define GET_TAG(p) ((markable_t)p &amp; MASK)\r\n    #define TAG(p, tag) ((markable_t)p | (tag))\r\n    #define MARK(p) ((markable_t)p | 0x01)\r\n    #define HAS_MARK(p) ((markable_t)p &amp; 0x01)\r\n    #define STRIP_MARK(p) ((node_t*)((markable_t)p &amp; ~(MASK | 0x01)))<\/pre>\n<\/div>\n<p><code>remove<\/code>\u7684\u5b9e\u73b0\uff1a<\/p>\n<div class=\"highlight\">\n<pre class=\"cpp\">\/* \u5148\u6807\u8bb0\u518d\u5220\u9664 *\/\r\n    if (!CAS(&amp;sitem-&gt;next, inext, MARK(inext))) {\r\n        continue;\r\n    }\r\n    int tag = GET_TAG(pred-&gt;next) + 1;\r\n    if (CAS(&amp;pred-&gt;next, item, TAG(STRIP_MARK(sitem-&gt;next), tag))) {\r\n        haz_defer_free(sitem);\r\n        return TRUE;\r\n    }<\/pre>\n<\/div>\n<p><code>insert<\/code>\u4e2d\u4e5f\u53ef\u4ee5\u66f4\u65b0<code>pred-&gt;next<\/code>\u7684\u8ba1\u6570\u3002<\/p>\n<h2>\u603b\u7ed3<\/h2>\n<p>\u65e0\u9501\u7684\u5b9e\u73b0\uff0c\u672c\u8d28\u4e0a\u90fd\u4f1a\u4f9d\u8d56\u4e8e<code>CAS<\/code>\u7684\u4e92\u65a5\u6027\u3002\u4ece\u5934\u5b9e\u73b0\u4e00\u4e2alock free\u7684\u6570\u636e\u7ed3\u6784\uff0c\u53ef\u4ee5\u6df1\u523b\u611f\u53d7\u5230lock free\u5b9e\u73b0\u7684tricky\u3002\u6700\u7ec8\u4ee3\u7801\u53ef\u4ee5\u4ece<a href=\"https:\/\/github.com\/kevinlynx\/lockfree-list\" target=\"_blank\" rel=\"noopener noreferrer\">\u8fd9\u91ccgithub<\/a>\u83b7\u53d6\u3002\u4ee3\u7801\u4e2d\u4e3a\u4e86\u7b80\u5355\uff0c\u5b9e\u73b0\u4e86\u4e00\u4e2a\u4e0d\u662f\u5f88\u5f3a\u5927\u7684hazard pointer\uff0c\u53ef\u4ee5<a href=\"http:\/\/codemacro.com\/2015\/05\/03\/hazard-pointer\/\" target=\"_blank\" rel=\"noopener noreferrer\">\u53c2\u8003\u4e4b\u524d\u7684\u535a\u6587<\/a>\u3002<\/p>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u539f\u6587\u5730\u5740 &nbsp; \u611f\u8c22\u540c\u4e8b\u3010kev<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"colormag_page_container_layout":"default_layout","colormag_page_sidebar_layout":"default_layout","footnotes":""},"categories":[],"tags":[119],"class_list":["post-4302","post","type-post","status-publish","format-standard","hentry","tag-03-"],"_links":{"self":[{"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/posts\/4302","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/comments?post=4302"}],"version-history":[{"count":0,"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/posts\/4302\/revisions"}],"wp:attachment":[{"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/media?parent=4302"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/categories?post=4302"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/tags?post=4302"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}