update elem_def.h

This commit is contained in:
zhangyi 2020-03-30 11:11:01 +08:00
parent d762634380
commit 5a92ea3031

View File

@ -47,7 +47,6 @@ public:
for (unsigned k = 0;;) {
cc_t curr = cc_.load(std::memory_order_acquire);
cc_t next = curr | (curr + 1); // find the first 0, and set it to 1.
if (next == 0) return 0;
if (cc_.compare_exchange_weak(curr, next, std::memory_order_release)) {
return next ^ curr; // return connected id
}