Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: change TokioExecutor::default to TokioExecutor::current #252

Merged
merged 1 commit into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading