Skip to content

Commit

Permalink
fix: change TokioExecutor::default to TokioExecutor::current
Browse files Browse the repository at this point in the history
  • Loading branch information
ethe committed Dec 16, 2024
1 parent d6f441c commit 09d1a23
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
2 changes: 1 addition & 1 deletion benches/criterion/writes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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| {
Expand Down
2 changes: 1 addition & 1 deletion bindings/python/src/db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ impl TonboDB {
.block_on(async {
DB::with_schema(
option,
TokioExecutor::new(),
TokioExecutor::current(),
desc,
primary_key_index.unwrap(),
)
Expand Down
2 changes: 1 addition & 1 deletion examples/datafusion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down

0 comments on commit 09d1a23

Please sign in to comment.