Skip to content

Commit 2615807

Browse files
committed
fixup! add ublk-nop example
1 parent 315ee6c commit 2615807

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎examples/nop.cpp‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,9 @@ ex::task<void> wait_signal(int ctrl_fd, int signal_fd, uint32_t dev_id,
5858
ex::inplace_stop_source &source) {
5959
std::println("ublk-nop: ublk device {} is running...", dev_id);
6060
auto parent_token = co_await ex::read_env(ex::get_stop_token);
61-
ex::inplace_stop_callback cb{parent_token,
62-
[&] noexcept { source.request_stop(); }};
61+
auto stop_request = [&] noexcept { source.request_stop(); };
62+
ex::inplace_stop_callback<decltype(stop_request)> cb{
63+
parent_token, std::move(stop_request)};
6364
signalfd_siginfo si;
6465
co_await (condy::async_read(signal_fd, condy::buffer(&si, sizeof(si)), 0) |
6566
ex::write_env(ex::prop{ex::get_stop_token, source.get_token()}));

0 commit comments

Comments
 (0)