16 copp::util::uint64_id_allocator alloc;
19 size_t id_num = 3 * (1 << 8) + 100;
22 for (
size_t i = 0; i < id_num; ++i) {
23 uint64_t
id = alloc.allocate();
32 copp::util::uint64_id_allocator alloc;
35 std::unique_ptr<std::thread> thds[40];
36 std::set<uint64_t> s[40];
37 for (
int i = 0; i < 40; ++i) {
38 std::set<uint64_t> *sp = &s[i];
39 thds[i].reset(
new std::thread([sp, &alloc]() {
40 size_t id_num = 36768;
42 for (
size_t j = 0; j < id_num; ++j) {
43 uint64_t
id = alloc.allocate();
51 for (
int i = 0; i < 40; ++i) {
56 s[0].insert(s[i].begin(), s[i].end());
CASE_TEST(coroutine_task, id_allocator_st)
constexpr auto size(TCONTAINER &&container) -> decltype(container.size())
#define CASE_EXPECT_EQ(l, r)
#define CASE_EXPECT_TRUE(c)