Skip to content

Commit aa7c163

Browse files
wllenyjbergwolf
authored andcommitted
introdude wrapper for async File and async Runtime
Async File wrapper for tokio::File and tokio_uring::File. Async runtime supports tokio and tokio-uring. Signed-off-by: wllenyj <[email protected]> Signed-off-by: Jiang Liu <[email protected]>
1 parent 1f417a3 commit aa7c163

File tree

10 files changed

+1163
-220
lines changed

10 files changed

+1163
-220
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ tokio-test = "0.4.2"
5252

5353
[features]
5454
default = ["fusedev"]
55-
async-io = ["async-trait", "futures", "tokio/fs", "tokio/net", "tokio/sync", "tokio/rt"]
55+
async-io = ["async-trait", "futures", "tokio/fs", "tokio/net", "tokio/sync", "tokio/rt", "tokio/macros"]
5656
fusedev = ["vmm-sys-util", "caps", "core-foundation-sys"]
5757
virtiofs = ["virtio-queue", "caps"]
5858
vhost-user-fs = ["virtiofs", "vhost", "caps"]

src/api/server/async_io.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -605,7 +605,7 @@ mod tests {
605605
.unwrap()
606606
.into();
607607

608-
let result = tokio_uring::start(async {
608+
let result = crate::async_runtime::block_on(async {
609609
unsafe { server.async_handle_message(r, w, None, None).await }
610610
});
611611
assert!(result.is_err());

0 commit comments

Comments
 (0)