diff --git a/README.md b/README.md index 97d787e..341f81a 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,7 @@ pub struct User { #[tokio::main] async fn main() { // pluggable async runtime and I/O - let db = DB::new("./db_path/users".into(), TokioExecutor::default()) + let db = DB::new("./db_path/users".into(), TokioExecutor::current()) .await .unwrap(); diff --git a/benches/criterion/writes.rs b/benches/criterion/writes.rs index 41f3af2..4e10259 100644 --- a/benches/criterion/writes.rs +++ b/benches/criterion/writes.rs @@ -61,7 +61,7 @@ fn single_write(c: &mut Criterion) { let option = DbOption::from(fusio::path::Path::from_filesystem_path("/tmp/tonbo").unwrap()) .disable_wal(); let db = runtime - .block_on(async { DB::new(option, TokioExecutor::default()).await }) + .block_on(async { DB::new(option, TokioExecutor::current()).await }) .unwrap(); group.bench_with_input(BenchmarkId::new("Tonbo", batch), &batch, |b, batch| { diff --git a/bindings/python/src/db.rs b/bindings/python/src/db.rs index 840ff72..8db90b0 100644 --- a/bindings/python/src/db.rs +++ b/bindings/python/src/db.rs @@ -62,7 +62,7 @@ impl TonboDB { .block_on(async { DB::with_schema( option, - TokioExecutor::new(), + TokioExecutor::current(), desc, primary_key_index.unwrap(), ) diff --git a/examples/datafusion.rs b/examples/datafusion.rs index 2b7dd16..5214f00 100644 --- a/examples/datafusion.rs +++ b/examples/datafusion.rs @@ -217,7 +217,7 @@ async fn main() -> Result<()> { let options = DbOption::from(Path::from_filesystem_path("./db_path/music").unwrap()); - let db = DB::new(options, TokioExecutor::default()).await.unwrap(); + let db = DB::new(options, TokioExecutor::current()).await.unwrap(); for (id, name, like) in [ (0, "welcome".to_string(), 0), (1, "tonbo".to_string(), 999), diff --git a/src/lib.rs b/src/lib.rs index b357fe6..6719d41 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -56,7 +56,7 @@ //! //! let options = DbOption::from(Path::from_filesystem_path("./db_path/users").unwrap()); //! // pluggable async runtime and I/O -//! let db = DB::new(options, TokioExecutor::default()).await.unwrap(); +//! let db = DB::new(options, TokioExecutor::current()).await.unwrap(); //! // insert with owned value //! db.insert(User { //! name: "Alice".into(),