mit-pdos / noria

Fast web applications through dynamic, partially-stateful dataflow
Apache License 2.0
4.97k stars 241 forks source link

Missing Tokio blocking features #162

Closed jonathanGB closed 4 years ago

jonathanGB commented 4 years ago

I think the current Tokio dependency is missing features.

I tried to compile a project depending on Noria, but I got the following error:

   Compiling noria v0.4.1 (https://github.com/mit-pdos/noria/#770509c3)
error[E0425]: cannot find function `block_in_place` in module `tokio::task`
  --> /home/jonathan/.cargo/git/checkouts/noria-8612be89bc6721f9/770509c/noria/src/channel/tcp.rs:82:26
   |
82 |             tokio::task::block_in_place(f)
   |                          ^^^^^^^^^^^^^^ not found in `tokio::task`

I looked at noria/Cargo.toml, which had the following Tokio dependency: tokio = { version = "0.2.19", features = ["net", "io-util", "sync", "time"] }.

Based on Tokio v0.2.19,

image

Thus, the present PR adds the two missing features: blocking, and rt-threaded. I also bump up Noria's version.

jonhoo commented 4 years ago

Ah, nice! You don't need to bump the version — there are already a bunch of changes that haven't been published, so I'll probably separately do a bump + release later.

jonathanGB commented 4 years ago

I reverted the bump. I'll wait till it passes the tests, then squash merge (with a clean commit message this time 🤷)