diff options
| author | levlam <levlam@telegram.org> | 2025-02-13 22:26:27 +0300 |
|---|---|---|
| committer | levlam <levlam@telegram.org> | 2025-02-13 22:26:27 +0300 |
| commit | ff103e3f9ff4ada94f36df00593ee2cb2f4369dd (patch) | |
| tree | 2af3b6cbcd397d4b12daf03987cd35bbeab9c4ed /tdutils/test | |
| parent | efe253f7d7c69fdc8cfff8b95ce4affdf9cebf17 (diff) | |
Replace init_slot with constructor.
Diffstat (limited to 'tdutils/test')
| -rw-r--r-- | tdutils/test/MpmcWaiter.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/tdutils/test/MpmcWaiter.cpp b/tdutils/test/MpmcWaiter.cpp index 668bfbd10..221578270 100644 --- a/tdutils/test/MpmcWaiter.cpp +++ b/tdutils/test/MpmcWaiter.cpp @@ -38,8 +38,7 @@ static void test_waiter_stress_one_one() { waiter->notify(); } } else { - typename W::Slot slot; - W::init_slot(slot, id); + typename W::Slot slot(id); for (size_t i = 1; i <= write_cnt; i++) { while (true) { auto x = value.load(std::memory_order_relaxed); @@ -106,8 +105,7 @@ static void test_waiter_stress() { waiter->notify(); } } else if (id > 10 && id - 10 <= read_n) { - typename W::Slot slot; - W::init_slot(slot, id); + typename W::Slot slot(id); while (true) { auto x = read_pos.load(std::memory_order_relaxed); if (x == end_pos) { |
