Skip to content

Commit 0bfcedd

Browse files
committed
Remove duplicate queuing_executor
1 parent 82c2d70 commit 0bfcedd

File tree

1 file changed

+0
-39
lines changed

1 file changed

+0
-39
lines changed

test/unit/ex/async_event.cpp

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -26,45 +26,6 @@ static_assert(IoAwaitable<async_event::wait_awaiter>);
2626

2727
namespace {
2828

29-
/** Queuing executor that queues coroutines for manual execution control.
30-
*/
31-
struct queuing_executor
32-
{
33-
std::queue<coro>* queue_;
34-
test_context* ctx_ = nullptr;
35-
36-
explicit queuing_executor(std::queue<coro>& q)
37-
: queue_(&q)
38-
{
39-
}
40-
41-
bool operator==(queuing_executor const& other) const noexcept
42-
{
43-
return queue_ == other.queue_;
44-
}
45-
46-
execution_context& context() const noexcept
47-
{
48-
return ctx_ ? *ctx_ : default_test_context();
49-
}
50-
51-
void on_work_started() const noexcept {}
52-
void on_work_finished() const noexcept {}
53-
54-
coro dispatch(coro h) const
55-
{
56-
queue_->push(h);
57-
return std::noop_coroutine();
58-
}
59-
60-
void post(coro h) const
61-
{
62-
queue_->push(h);
63-
}
64-
};
65-
66-
static_assert(Executor<queuing_executor>);
67-
6829
/** Run a task to completion by manually stepping through it.
6930
*/
7031
template<class T>

0 commit comments

Comments
 (0)