djc / bb8

Full-featured async (tokio-based) postgres connection pool (like r2d2)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Update to tokio 0.3

krojew opened this issue · comments

Since tokio 0.3 is out with some major changes, it would be a good idea to update.

bb8-redis depends on redis, which needs to upgrade.

We also have an example that depends on hyper.

You can wrap them in tokio-compat-02.

That seems like extra work, for the limited gain of having bb8 on tokio 0.3 a little sooner. I'm unlikely to do it (unless you want to fund the work), although I'll review it if you want to do the legwork.

The problem with bb8 on tokio 0.2 now is that it cannot be used by applications using 0.3, even with the compatibility layer. Any future returned by bb8 must be wrapped in a 0.2 wrapper, but if it then calls a future from 0.3, for example anything net related, the process panics.

I'm aware of this, but I don't feel that keeping your application on 0.2 a little while longer is a big deal.

I've pushed a branch which has bb8 and bb8-postgres working on tokio 0.3. I've temporarily removed the bb8-redis crate and the postgres hyper example from this branch, and will add them back as hyper/redis release new versions.

Would be happy to get any feedback on this branch, but the changes were very minor anyway.

Looks like it's working.

I've released version 0.6.0 of bb8 and bb8-postgres with tokio 0.3 support.

I've just released bb8-redis 0.7, which supports tokio 0.3.