cdrs icon indicating copy to clipboard operation
cdrs copied to clipboard

[Question] BB8 drop-in for async/futures support?

Open ArtRand opened this issue 6 years ago • 1 comments

Hello, first off, superb job on this crate and version 2. I really like using it. Along those lines, I'd like to help contribute if possible. I was looking at a way to use rust futures/async-io and came across bb88. It might be possible to simple drop this in where you're using r2d2 for connection pool management and get futures support. Have you thought about this? (Basically I'm asking is this a fool's errand?). If you think this is a viable method - I'd be interested in implementing it. Thanks for the hard work!

A

ArtRand avatar Jul 15 '19 16:07 ArtRand

Hi @ArtRand,

Initially I was thinking about creating a separate crate for async implementation of the driver, but using bb8 sounds interesting!

I'd love to see this PR. If it's possible please consider a conditional compilation for such implementation. We can introduce a new feature flag, for instance async, and to keep old implementation by adding annotations #[cfg(not(async))] and to add new functionality under #[cfg(async)].

AlexPikalov avatar Jul 15 '19 18:07 AlexPikalov