Hi, I'm trying to implement a "read TCP connection with timeout" function, so I want to make read()
future returns immediately after the client hasn't sent data in 10s.
rust_panic (@rust_panic:7)
rust_panic_with_hook (@std::panicking::rust_panic_with_hook::h3cf1e389ae2148cd:129)
{closure#0} (@std::panicking::begin_panic_handler::_$u7b$$u7b$closure$u7d$$u7d$::h0a5f32b79c6e3a95:52)
__rust_end_short_backtrace<std::panicking::begin_panic_handler::{closure_env#0}, !> (@std::sys_common::backtrace::__rust_end_short_backtrace::h6d640bca5165509c:9)
begin_panic_handler (@rust_begin_unwind:21)
panic_fmt (@core::panicking::panic_fmt::h1c34501c4b8544a1:13)
unwrap_failed (@core::result::unwrap_failed::ha9974bfbcd81656a:26)
expect<core::cell::RefMut<tokio_uring::driver::Inner>, core::cell::BorrowMutError> (@core::result::Result$LT$T$C$E$GT$::expect::hf295eccdaa9ab954:32)
borrow_mut<tokio_uring::driver::Inner> (@core::cell::RefCell$LT$T$GT$::borrow_mut::h5be30d736c2998d7:15)
{closure#0}<tokio_uring::driver::close::Close, tokio_uring::driver::close::{impl#0}::close::{closure_env#0}> (/home/robi/Code/rust/tokio-uring/src/driver/op.rs:68)
with<alloc::rc::Rc<core::cell::RefCell<tokio_uring::driver::Inner>>, tokio_uring::driver::op::{impl#0}::submit_with::{closure_env#0}<tokio_uring::driver::close::Close, tokio_uring::driver::close::{impl#0}::close::{closure_env#0}>, core::result::Result<tokio_uring::driver::op::Op<tokio_uring::driver::close::Close>, std::io::error::Error>> (/home/robi/.cargo/registry/src/mirrors.tuna.tsinghua.edu.cn-df7c3c540f42cdbd/scoped-tls-1.0.0/src/lib.rs:171)
submit_with<tokio_uring::driver::close::Close, tokio_uring::driver::close::{impl#0}::close::{closure_env#0}> (/home/robi/Code/rust/tokio-uring/src/driver/op.rs:67)
try_submit_with<tokio_uring::driver::close::Close, tokio_uring::driver::close::{impl#0}::close::{closure_env#0}> (/home/robi/Code/rust/tokio-uring/src/driver/op.rs:101)
close (/home/robi/Code/rust/tokio-uring/src/driver/close.rs:14)
submit_close_op (/home/robi/Code/rust/tokio-uring/src/driver/shared_fd.rs:77)
drop (/home/robi/Code/rust/tokio-uring/src/driver/shared_fd.rs:140)
drop_in_place<tokio_uring::driver::shared_fd::Inner> (@core::ptr::drop_in_place$LT$tokio_uring..driver..shared_fd..Inner$GT$::hb8a14c69a05e7e33:8)
drop<tokio_uring::driver::shared_fd::Inner> (@_$LT$alloc..rc..Rc$LT$T$GT$$u20$as$u20$core..ops..drop..Drop$GT$::drop::hb002e9fd80b7c14d:30)
drop_in_place<alloc::rc::Rc<tokio_uring::driver::shared_fd::Inner>> (@core::ptr::drop_in_place$LT$alloc..rc..Rc$LT$tokio_uring..driver..shared_fd..Inner$GT$$GT$::h222ed3da7126a159:6)
drop_in_place<tokio_uring::driver::shared_fd::SharedFd> (@core::ptr::drop_in_place$LT$tokio_uring..driver..shared_fd..SharedFd$GT$::hfccfc25a4a14ce2c:6)
drop_in_place<tokio_uring::driver::read::Read<alloc::vec::Vec<u8, alloc::alloc::Global>>> (@core::ptr::drop_in_place$LT$tokio_uring..driver..read..Read$LT$alloc..vec..Vec$LT$u8$GT$$GT$$GT$::h16b1649dabfe6007:8)
drop_in_place<core::option::Option<tokio_uring::driver::read::Read<alloc::vec::Vec<u8, alloc::alloc::Global>>>> (@core::ptr::drop_in_place$LT$core..option..Option$LT$tokio_uring..driver..read..Read$LT$alloc..vec..Vec$LT$u8$GT$$GT$$GT$$GT$::h9ff4ad4f264b10be:16)
drop_in_place<alloc::boxed::Box<dyn core::any::Any, alloc::alloc::Global>> (@core::ptr::drop_in_place$LT$alloc..boxed..Box$LT$dyn$u20$core..any..Any$GT$$GT$::h1aa706a56d43585d:11)
drop_in_place<tokio_uring::driver::op::Lifecycle> (@core::ptr::drop_in_place$LT$tokio_uring..driver..op..Lifecycle$GT$::h56bb8e50d8665171:31)
complete (/home/robi/Code/rust/tokio-uring/src/driver/op.rs:186)
complete (/home/robi/Code/rust/tokio-uring/src/driver/mod.rs:170)
tick (/home/robi/Code/rust/tokio-uring/src/driver/mod.rs:111)
tick (/home/robi/Code/rust/tokio-uring/src/driver/mod.rs:80)
{async_block#0}<core::future::from_generator::GenFuture<tcp_listener::main::{async_block_env#0}>> (/home/robi/Code/rust/tokio-uring/src/runtime.rs:82)
poll<tokio_uring::runtime::{impl#0}::block_on::{closure#0}::{async_block_env#0}<core::future::from_generator::GenFuture<tcp_listener::main::{async_block_env#0}>>> (@_$LT$core..future..from_generator..GenFuture$LT$T$GT$$u20$as$u20$core..future..future..Future$GT$::poll::h6ce2355388535dcc:21)
{closure#1}<core::future::from_generator::GenFuture<tcp_listener::main::{async_block_env#0}>> (/home/robi/Code/rust/tokio-uring/src/runtime.rs:92)
poll<(), tokio_uring::runtime::{impl#0}::block_on::{closure#0}::{closure_env#1}<core::future::from_generator::GenFuture<tcp_listener::main::{async_block_env#0}>>> (/home/robi/Code/rust/tokio-uring/src/future.rs:35)
{closure#0}<tokio_uring::future::PollFn<tokio_uring::runtime::{impl#0}::block_on::{closure#0}::{closure_env#1}<core::future::from_generator::GenFuture<tcp_listener::main::{async_block_env#0}>>>> (/home/robi/.cargo/registry/src/mirrors.tuna.tsinghua.edu.cn-df7c3c540f42cdbd/tokio-1.15.0/src/task/local.rs:642)
{closure#0}<core::task::poll::Poll<()>, tokio::task::local::{impl#5}::poll::{closure#0}::{closure_env#0}<tokio_uring::future::PollFn<tokio_uring::runtime::{impl#0}::block_on::{closure#0}::{closure_env#1}<core::future::from_generator::GenFuture<tcp_listener::main::{async_block_env#0}>>>>> (/home/robi/.cargo/registry/src/mirrors.tuna.tsinghua.edu.cn-df7c3c540f42cdbd/tokio-1.15.0/src/coop.rs:102)
try_with<core::cell::Cell<tokio::coop::Budget>, tokio::coop::with_budget::{closure_env#0}<core::task::poll::Poll<()>, tokio::task::local::{impl#5}::poll::{closure#0}::{closure_env#0}<tokio_uring::future::PollFn<tokio_uring::runtime::{impl#0}::block_on::{closure#0}::{closure_env#1}<core::future::from_generator::GenFuture<tcp_listener::main::{async_block_env#0}>>>>>, core::task::poll::Poll<()>> (@std::thread::local::LocalKey$LT$T$GT$::try_with::hfaec365b06919edb:55)
with<core::cell::Cell<tokio::coop::Budget>, tokio::coop::with_budget::{closure_env#0}<core::task::poll::Poll<()>, tokio::task::local::{impl#5}::poll::{closure#0}::{closure_env#0}<tokio_uring::future::PollFn<tokio_uring::runtime::{impl#0}::block_on::{closure#0}::{closure_env#1}<core::future::from_generator::GenFuture<tcp_listener::main::{async_block_env#0}>>>>>, core::task::poll::Poll<()>> (@std::thread::local::LocalKey$LT$T$GT$::with::hc75e59a32501a831:13)
tokio::coop::with_budget::h75dea0622c0d8d18 (/home/robi/.cargo/registry/src/mirrors.tuna.tsinghua.edu.cn-df7c3c540f42cdbd/tokio-1.15.0/src/coop.rs:95)
tokio::coop::budget::h1ee2fa0796c49b2a (/home/robi/.cargo/registry/src/mirrors.tuna.tsinghua.edu.cn-df7c3c540f42cdbd/tokio-1.15.0/src/coop.rs:72)
{closure#0}<tokio_uring::future::PollFn<tokio_uring::runtime::{impl#0}::block_on::{closure#0}::{closure_env#1}<core::future::from_generator::GenFuture<tcp_listener::main::{async_block_env#0}>>>> (/home/robi/.cargo/registry/src/mirrors.tuna.tsinghua.edu.cn-df7c3c540f42cdbd/tokio-1.15.0/src/task/local.rs:642)
set<tokio::task::local::Context, tokio::task::local::{impl#5}::poll::{closure_env#0}<tokio_uring::future::PollFn<tokio_uring::runtime::{impl#0}::block_on::{closure#0}::{closure_env#1}<core::future::from_generator::GenFuture<tcp_listener::main::{async_block_env#0}>>>>, core::task::poll::Poll<()>> (/home/robi/.cargo/registry/src/mirrors.tuna.tsinghua.edu.cn-df7c3c540f42cdbd/tokio-1.15.0/src/macros/scoped_tls.rs:61)
with<core::task::poll::Poll<()>, tokio::task::local::{impl#5}::poll::{closure_env#0}<tokio_uring::future::PollFn<tokio_uring::runtime::{impl#0}::block_on::{closure#0}::{closure_env#1}<core::future::from_generator::GenFuture<tcp_listener::main::{async_block_env#0}>>>>> (/home/robi/.cargo/registry/src/mirrors.tuna.tsinghua.edu.cn-df7c3c540f42cdbd/tokio-1.15.0/src/task/local.rs:559)
poll<tokio_uring::future::PollFn<tokio_uring::runtime::{impl#0}::block_on::{closure#0}::{closure_env#1}<core::future::from_generator::GenFuture<tcp_listener::main::{async_block_env#0}>>>> (/home/robi/.cargo/registry/src/mirrors.tuna.tsinghua.edu.cn-df7c3c540f42cdbd/tokio-1.15.0/src/task/local.rs:632)
{async_fn#0}<tokio_uring::future::PollFn<tokio_uring::runtime::{impl#0}::block_on::{closure#0}::{closure_env#1}<core::future::from_generator::GenFuture<tcp_listener::main::{async_block_env#0}>>>> (/home/robi/.cargo/registry/src/mirrors.tuna.tsinghua.edu.cn-df7c3c540f42cdbd/tokio-1.15.0/src/task/local.rs:505)
poll<tokio::task::local::{impl#0}::run_until::{async_fn_env#0}<tokio_uring::future::PollFn<tokio_uring::runtime::{impl#0}::block_on::{closure#0}::{closure_env#1}<core::future::from_generator::GenFuture<tcp_listener::main::{async_block_env#0}>>>>> (@_$LT$core..future..from_generator..GenFuture$LT$T$GT$$u20$as$u20$core..future..future..Future$GT$::poll::ha8e2c452ae0a69df:21)
poll<&mut core::future::from_generator::GenFuture<tokio::task::local::{impl#0}::run_until::{async_fn_env#0}<tokio_uring::future::PollFn<tokio_uring::runtime::{impl#0}::block_on::{closure#0}::{closure_env#1}<core::future::from_generator::GenFuture<tcp_listener::main::{async_block_env#0}>>>>>> (@_$LT$core..pin..Pin$LT$P$GT$$u20$as$u20$core..future..future..Future$GT$::poll::h12d9aa0d3dc38df1:18)
{closure#0}<tokio::runtime::driver::Driver, core::pin::Pin<&mut core::future::from_generator::GenFuture<tokio::task::local::{impl#0}::run_until::{async_fn_env#0}<tokio_uring::future::PollFn<tokio_uring::runtime::{impl#0}::block_on::{closure#0}::{closure_env#1}<core::future::from_generator::GenFuture<tcp_listener::main::{async_block_env#0}>>>>>>> (/home/robi/.cargo/registry/src/mirrors.tuna.tsinghua.edu.cn-df7c3c540f42cdbd/tokio-1.15.0/src/runtime/basic_scheduler.rs:240)
{closure#0}<core::task::poll::Poll<()>, tokio::runtime::basic_scheduler::{impl#2}::block_on::{closure#0}::{closure_env#0}<tokio::runtime::driver::Driver, core::pin::Pin<&mut core::future::from_generator::GenFuture<tokio::task::local::{impl#0}::run_until::{async_fn_env#0}<tokio_uring::future::PollFn<tokio_uring::runtime::{impl#0}::block_on::{closure#0}::{closure_env#1}<core::future::from_generator::GenFuture<tcp_listener::main::{async_block_env#0}>>>>>>>> (/home/robi/.cargo/registry/src/mirrors.tuna.tsinghua.edu.cn-df7c3c540f42cdbd/tokio-1.15.0/src/coop.rs:102)
try_with<core::cell::Cell<tokio::coop::Budget>, tokio::coop::with_budget::{closure_env#0}<core::task::poll::Poll<()>, tokio::runtime::basic_scheduler::{impl#2}::block_on::{closure#0}::{closure_env#0}<tokio::runtime::driver::Driver, core::pin::Pin<&mut core::future::from_generator::GenFuture<tokio::task::local::{impl#0}::run_until::{async_fn_env#0}<tokio_uring::future::PollFn<tokio_uring::runtime::{impl#0}::block_on::{closure#0}::{closure_env#1}<core::future::from_generator::GenFuture<tcp_listener::main::{async_block_env#0}>>>>>>>>, core::task::poll::Poll<()>> (@std::thread::local::LocalKey$LT$T$GT$::try_with::heb231fbe63433d36:55)
with<core::cell::Cell<tokio::coop::Budget>, tokio::coop::with_budget::{closure_env#0}<core::task::poll::Poll<()>, tokio::runtime::basic_scheduler::{impl#2}::block_on::{closure#0}::{closure_env#0}<tokio::runtime::driver::Driver, core::pin::Pin<&mut core::future::from_generator::GenFuture<tokio::task::local::{impl#0}::run_until::{async_fn_env#0}<tokio_uring::future::PollFn<tokio_uring::runtime::{impl#0}::block_on::{closure#0}::{closure_env#1}<core::future::from_generator::GenFuture<tcp_listener::main::{async_block_env#0}>>>>>>>>, core::task::poll::Poll<()>> (@std::thread::local::LocalKey$LT$T$GT$::with::hfb083861b8949336:13)
tokio::coop::with_budget::h10416856f6cf7971 (/home/robi/.cargo/registry/src/mirrors.tuna.tsinghua.edu.cn-df7c3c540f42cdbd/tokio-1.15.0/src/coop.rs:95)
tokio::coop::budget::hc890c64c8aa72bd1 (/home/robi/.cargo/registry/src/mirrors.tuna.tsinghua.edu.cn-df7c3c540f42cdbd/tokio-1.15.0/src/coop.rs:72)
{closure#0}<tokio::runtime::driver::Driver, core::pin::Pin<&mut core::future::from_generator::GenFuture<tokio::task::local::{impl#0}::run_until::{async_fn_env#0}<tokio_uring::future::PollFn<tokio_uring::runtime::{impl#0}::block_on::{closure#0}::{closure_env#1}<core::future::from_generator::GenFuture<tcp_listener::main::{async_block_env#0}>>>>>>> (/home/robi/.cargo/registry/src/mirrors.tuna.tsinghua.edu.cn-df7c3c540f42cdbd/tokio-1.15.0/src/runtime/basic_scheduler.rs:240)
{closure#0}<tokio::runtime::basic_scheduler::{impl#2}::block_on::{closure_env#0}<tokio::runtime::driver::Driver, core::pin::Pin<&mut core::future::from_generator::GenFuture<tokio::task::local::{impl#0}::run_until::{async_fn_env#0}<tokio_uring::future::PollFn<tokio_uring::runtime::{impl#0}::block_on::{closure#0}::{closure_env#1}<core::future::from_generator::GenFuture<tcp_listener::main::{async_block_env#0}>>>>>>>, (), tokio::runtime::driver::Driver> (/home/robi/.cargo/registry/src/mirrors.tuna.tsinghua.edu.cn-df7c3c540f42cdbd/tokio-1.15.0/src/runtime/basic_scheduler.rs:349)
set<tokio::runtime::basic_scheduler::Context, tokio::runtime::basic_scheduler::enter::{closure_env#0}<tokio::runtime::basic_scheduler::{impl#2}::block_on::{closure_env#0}<tokio::runtime::driver::Driver, core::pin::Pin<&mut core::future::from_generator::GenFuture<tokio::task::local::{impl#0}::run_until::{async_fn_env#0}<tokio_uring::future::PollFn<tokio_uring::runtime::{impl#0}::block_on::{closure#0}::{closure_env#1}<core::future::from_generator::GenFuture<tcp_listener::main::{async_block_env#0}>>>>>>>, (), tokio::runtime::driver::Driver>, ()> (/home/robi/.cargo/registry/src/mirrors.tuna.tsinghua.edu.cn-df7c3c540f42cdbd/tokio-1.15.0/src/macros/scoped_tls.rs:61)
enter<tokio::runtime::basic_scheduler::{impl#2}::block_on::{closure_env#0}<tokio::runtime::driver::Driver, core::pin::Pin<&mut core::future::from_generator::GenFuture<tokio::task::local::{impl#0}::run_until::{async_fn_env#0}<tokio_uring::future::PollFn<tokio_uring::runtime::{impl#0}::block_on::{closure#0}::{closure_env#1}<core::future::from_generator::GenFuture<tcp_listener::main::{async_block_env#0}>>>>>>>, (), tokio::runtime::driver::Driver> (/home/robi/.cargo/registry/src/mirrors.tuna.tsinghua.edu.cn-df7c3c540f42cdbd/tokio-1.15.0/src/runtime/basic_scheduler.rs:349)
block_on<tokio::runtime::driver::Driver, core::pin::Pin<&mut core::future::from_generator::GenFuture<tokio::task::local::{impl#0}::run_until::{async_fn_env#0}<tokio_uring::future::PollFn<tokio_uring::runtime::{impl#0}::block_on::{closure#0}::{closure_env#1}<core::future::from_generator::GenFuture<tcp_listener::main::{async_block_env#0}>>>>>>> (/home/robi/.cargo/registry/src/mirrors.tuna.tsinghua.edu.cn-df7c3c540f42cdbd/tokio-1.15.0/src/runtime/basic_scheduler.rs:230)
block_on<tokio::runtime::driver::Driver, core::pin::Pin<&mut core::future::from_generator::GenFuture<tokio::task::local::{impl#0}::run_until::{async_fn_env#0}<tokio_uring::future::PollFn<tokio_uring::runtime::{impl#0}::block_on::{closure#0}::{closure_env#1}<core::future::from_generator::GenFuture<tcp_listener::main::{async_block_env#0}>>>>>>> (/home/robi/.cargo/registry/src/mirrors.tuna.tsinghua.edu.cn-df7c3c540f42cdbd/tokio-1.15.0/src/runtime/basic_scheduler.rs:501)
block_on<tokio::runtime::driver::Driver, core::future::from_generator::GenFuture<tokio::task::local::{impl#0}::run_until::{async_fn_env#0}<tokio_uring::future::PollFn<tokio_uring::runtime::{impl#0}::block_on::{closure#0}::{closure_env#1}<core::future::from_generator::GenFuture<tcp_listener::main::{async_block_env#0}>>>>>> (/home/robi/.cargo/registry/src/mirrors.tuna.tsinghua.edu.cn-df7c3c540f42cdbd/tokio-1.15.0/src/runtime/basic_scheduler.rs:186)
block_on<core::future::from_generator::GenFuture<tokio::task::local::{impl#0}::run_until::{async_fn_env#0}<tokio_uring::future::PollFn<tokio_uring::runtime::{impl#0}::block_on::{closure#0}::{closure_env#1}<core::future::from_generator::GenFuture<tcp_listener::main::{async_block_env#0}>>>>>> (/home/robi/.cargo/registry/src/mirrors.tuna.tsinghua.edu.cn-df7c3c540f42cdbd/tokio-1.15.0/src/runtime/mod.rs:461)
{closure#0}<core::future::from_generator::GenFuture<tcp_listener::main::{async_block_env#0}>> (/home/robi/Code/rust/tokio-uring/src/runtime.rs:90)
{closure#0}<(), tokio_uring::runtime::{impl#0}::block_on::{closure_env#0}<core::future::from_generator::GenFuture<tcp_listener::main::{async_block_env#0}>>> (/home/robi/Code/rust/tokio-uring/src/driver/mod.rs:75)
set<alloc::rc::Rc<core::cell::RefCell<tokio_uring::driver::Inner>>, tokio_uring::driver::{impl#0}::with::{closure_env#0}<(), tokio_uring::runtime::{impl#0}::block_on::{closure_env#0}<core::future::from_generator::GenFuture<tcp_listener::main::{async_block_env#0}>>>, ()> (/home/robi/.cargo/registry/src/mirrors.tuna.tsinghua.edu.cn-df7c3c540f42cdbd/scoped-tls-1.0.0/src/lib.rs:137)
with<(), tokio_uring::runtime::{impl#0}::block_on::{closure_env#0}<core::future::from_generator::GenFuture<tcp_listener::main::{async_block_env#0}>>> (/home/robi/Code/rust/tokio-uring/src/driver/mod.rs:75)
block_on<core::future::from_generator::GenFuture<tcp_listener::main::{async_block_env#0}>> (/home/robi/Code/rust/tokio-uring/src/runtime.rs:77)
start<core::future::from_generator::GenFuture<tcp_listener::main::{async_block_env#0}>> (/home/robi/Code/rust/tokio-uring/src/lib.rs:144)
main (/home/robi/Code/rust/tokio-uring/examples/tcp_listener.rs:14)
call_once<fn(), ()> (@core::ops::function::FnOnce::call_once::h0bdead0eeb99adf8:6)
__rust_begin_short_backtrace<fn(), ()> (@std::sys_common::backtrace::__rust_begin_short_backtrace::hd1d69321906bc1f5:6)
{closure#0}<()> (@std::rt::lang_start::_$u7b$$u7b$closure$u7d$$u7d$::h5cc8ca0dca6d7b4a:7)
core::ops::function::impls::_$LT$impl$u20$core..ops..function..FnOnce$LT$A$GT$$u20$for$u20$$RF$F$GT$::call_once::hb0de949e057e3b17 (@std::rt::lang_start_internal::he0f2542e47c09e70:172)
std::panicking::try::do_call::hcf3b1fbd7249caa5 (@std::rt::lang_start_internal::he0f2542e47c09e70:170)
std::panicking::try::h3f0d88b1713d48ca (@std::rt::lang_start_internal::he0f2542e47c09e70:170)
std::panic::catch_unwind::hf9ae408bcd761f44 (@std::rt::lang_start_internal::he0f2542e47c09e70:170)
std::rt::lang_start_internal::_$u7b$$u7b$closure$u7d$$u7d$::hd83541db0ecf9e5b (@std::rt::lang_start_internal::he0f2542e47c09e70:170)
std::panicking::try::do_call::h9d93145031632300 (@std::rt::lang_start_internal::he0f2542e47c09e70:170)
std::panicking::try::h5c1ae104f0d6f1fd (@std::rt::lang_start_internal::he0f2542e47c09e70:170)
std::panic::catch_unwind::h932b68c0b8fd6df3 (@std::rt::lang_start_internal::he0f2542e47c09e70:170)
lang_start_internal (@std::rt::lang_start_internal::he0f2542e47c09e70:170)
lang_start<()> (@std::rt::lang_start::h328b1a37be837683:13)
main (@main:10)
__libc_start_main (@__libc_start_main:64)
_start (@_start:15)