void get_items(void) { for (;;) { long id; bool got = stk.pop(&id); if (got) { bool erased = data.erase(id); assert(erased); ++pop_count; } else if (not running) return; } }
void get_items(void) { for (;;) { thread::yield(); long id; bool got = stk.pop(&id); if (got) { bool erased = data.erase(id); assert(erased); } else if (not running) return; } }