This commit is contained in:
Christian Schwarz
2023-12-11 17:31:48 +00:00
parent ea107e9687
commit 2e96a6be28
2 changed files with 2 additions and 5 deletions

View File

@@ -1,4 +1,3 @@
use page_cache::FileId;
use virtual_file::VirtualFile;
mod page_cache;
@@ -7,7 +6,7 @@ mod virtual_file;
fn main() {
page_cache::init(10);
let x: Box<dyn std::future::Future<Output=()> + Send> = Box::new(async move {
tokio::spawn(async move {
let cache = page_cache::get();
let res = cache

View File

@@ -15,12 +15,10 @@ use camino::{Utf8Path, Utf8PathBuf};
use once_cell::sync::OnceCell;
use std::fs::{self, File};
use std::io::{Error, ErrorKind, Seek, SeekFrom};
use std::os::fd::{AsFd, AsRawFd, BorrowedFd, FromRawFd, IntoRawFd, OwnedFd, RawFd};
use std::os::fd::{AsRawFd, FromRawFd, OwnedFd, RawFd};
use std::os::unix::fs::FileExt;
use std::sync::atomic::{AtomicBool, AtomicUsize, Ordering};
use std::sync::Arc;
use tokio::sync::{RwLock, RwLockReadGuard, RwLockWriteGuard};
use tokio::time::Instant;
use utils::fs_ext;
///