Rename reactor -> driver, prep for lib/reactivity
This commit is contained in:
@@ -16,7 +16,7 @@ use std::thread;
|
||||
use crate::op::completion::completion_for_current_thread;
|
||||
use crate::op::fs::{FileType, FsOp, MetadataTarget, OpenOptions, RawDirEntry, RawMetadata};
|
||||
use crate::platform::linux_x86_64::runtime::{
|
||||
ThreadHandle, current_thread_handle, with_current_reactor,
|
||||
ThreadHandle, current_thread_handle, with_current_driver,
|
||||
};
|
||||
use crate::platform::linux_x86_64::uring::{
|
||||
IORING_FSYNC_DATASYNC, IORING_OP_CLOSE, IORING_OP_FSYNC, IORING_OP_FTRUNCATE,
|
||||
@@ -474,14 +474,14 @@ where
|
||||
{
|
||||
let (future, handle) = completion_for_current_thread::<io::Result<T>>();
|
||||
let callback_handle = handle.clone();
|
||||
let token = with_current_reactor(|reactor| {
|
||||
reactor.submit_operation(fill, move |cqe| {
|
||||
let token = with_current_driver(|driver| {
|
||||
driver.submit_operation(fill, move |cqe| {
|
||||
callback_handle.complete(map(cqe));
|
||||
})
|
||||
})?;
|
||||
|
||||
handle.set_cancel(move || {
|
||||
let _ = with_current_reactor(|reactor| reactor.cancel_operation(token));
|
||||
let _ = with_current_driver(|driver| driver.cancel_operation(token));
|
||||
});
|
||||
|
||||
future.await
|
||||
|
||||
Reference in New Issue
Block a user