Export
This commit is contained in:
parent
1c41bbd2c2
commit
b628e20ff9
28
Cargo.lock
generated
28
Cargo.lock
generated
@ -85,20 +85,6 @@ version = "1.0.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1d07550c9036bf2ae0c684c4297d503f838287c83c53686d05370d0e139ae570"
|
||||
|
||||
[[package]]
|
||||
name = "curio"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"env_logger",
|
||||
"io-uring",
|
||||
"libc",
|
||||
"log",
|
||||
"send_wrapper",
|
||||
"slab",
|
||||
"slotmap",
|
||||
"unchecked-refcell",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "defmt"
|
||||
version = "1.1.1"
|
||||
@ -388,6 +374,20 @@ version = "1.0.26"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d245f478577f809a851594d02313b640fb437e0bb33866753cff937863096954"
|
||||
|
||||
[[package]]
|
||||
name = "uring_async"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"env_logger",
|
||||
"io-uring",
|
||||
"libc",
|
||||
"log",
|
||||
"send_wrapper",
|
||||
"slab",
|
||||
"slotmap",
|
||||
"unchecked-refcell",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "utf8parse"
|
||||
version = "0.2.2"
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
[package]
|
||||
name = "curio"
|
||||
name = "uring_async"
|
||||
version = "0.1.0"
|
||||
edition = "2024"
|
||||
|
||||
|
||||
@ -60,6 +60,8 @@ impl Runtime {
|
||||
.setup_no_sqarray()
|
||||
.build(128)
|
||||
.expect("failed to create ring");
|
||||
assert!(ring.params().is_feature_nodrop(), "missing IORING_FEAT_NODROP (kernel 5.19)");
|
||||
assert!(ring.params().is_feature_ext_arg(), "missing IORING_FEAT_EXT_ARG (kernel 5.11)");
|
||||
let submitter = ring.submitter();
|
||||
submitter
|
||||
.register_restrictions(&mut [Restriction::sqe_op(Nop::CODE)])
|
||||
@ -95,7 +97,7 @@ impl Runtime {
|
||||
if lock.is_some() {
|
||||
panic!("runtime already initialized on this thread");
|
||||
}
|
||||
*lock = Some(Runtime(Rc::clone(&self.0)))
|
||||
*lock = Some(Runtime(Rc::clone(&self.0)));
|
||||
});
|
||||
|
||||
let mut lock = self.0.borrow_mut();
|
||||
@ -211,6 +213,10 @@ impl Runtime {
|
||||
lock = self.0.borrow_mut();
|
||||
}
|
||||
}
|
||||
RT.with(|cell| {
|
||||
let mut lock = cell.borrow_mut();
|
||||
*lock = None;
|
||||
});
|
||||
trace!("Exiting");
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user