hypercube-lab / hypercube

HyperCube is a revolutionary, high-performance decentralized computing platform. HyperCube has powerful computing capabilities to provide high-performance computing power and large-scale data storage support for VR, AR, Metaverse, Artificial Intelligence, Big Data, and Financial Applications.🛰
GNU General Public License v3.0
974 stars 222 forks source link

Futures are used to store the return values from RPC calls. #2

Open hypercube-lab opened 2 years ago

hypercube-lab commented 2 years ago

The accountant stub routines are all contained inside a single block. That's OK for the time being, but we'll want to switch to all async calls as soon as possible. For now, wrapping each return value in a future and updating the callers (most of whom are in client-demo.rs) to utilize them is a good first step toward getting there.

See https://crates.io/crates/futures for further information.

It's worth noting that the tokio framework reexports the same future library, which means that if we utilize it as our async runtime, the move will be seamless.

agnitazudkll commented 2 years ago

What version of futures were you considering?

agnitazudkll commented 2 years ago

I saw it and it includes a ton of major breaking changes from 0.1.21, so I wanted to see what others thought.

agnitazudkll commented 2 years ago

it's definitely an improvement but a little tricky since it's a whole new framework