rethinkdb / rethinkdb-rs

A native RethinkDB driver written in Rust
Apache License 2.0
210 stars 27 forks source link

Eliminate use of threads by creating a better integration with Tokio #8

Closed rushmorem closed 3 years ago

Sumrachek commented 5 years ago

Hello! I'm going to use reql in some project and worried by this issue. It is critical for me to process many parallel requests and I don't want to have many threads. My project uses only stable Rust, so I can use only 0.0.26 reql version. Is it possible to fix the issue in 0.0.2x version?

rushmorem commented 5 years ago

I'm going to use reql in some project and worried by this issue. It is critical for me to process many parallel requests and I don't want to have many threads.

This will be resolved in v0.1.0 which I'm currently working towards in the next branch. I've already eliminated all threads in that branch.

My project uses only stable Rust, so I can use only 0.0.26 reql version. Is it possible to fix the issue in 0.0.2x version?

Unfortunately, I don't personally have enough time to continue development on the 0.0.2x series. My focus right now is release v0.1.0 as soon as possible. That version will, unfortunately, require nightly Rust as it makes use of async/await features.

TotalKrill commented 5 years ago

Looking forward to it!

charleschege commented 5 years ago

Do you have a release date in mind?

khionu commented 4 years ago

Will this be usable without Tokio? I have my own Executor that I would be using it with.

zicklag commented 4 years ago

That version will, unfortunately, require nightly Rust as it makes use of async/await features.

Will it be able to support stable now with async being in Rust 1.39?

zicklag commented 4 years ago

FYI I just found that we still need nightly to use the args! macro as it requires the proc_macro_hygiene feature.

Related: https://github.com/rethinkdb/rethinkdb-rs/issues/30.

rushmorem commented 3 years ago

Latest version, v0.1.0 no longer uses threads. It is fully async.

Will this be usable without Tokio? I have my own Executor that I would be using it with.

Yes. See https://docs.rs/reql/0.1.0/reql/index.html#import-the-driver for details.

zicklag commented 3 years ago

Yay! Good job getting the release out @rushmorem. The lib's looking more tidy and Rusty. 🙂

rushmorem commented 3 years ago

Thanks @zicklag :)