You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To improve the efficiency of bulk/multi lookups, we could call lookups async and await on the results of all lookups -- rather than awaiting on them individually.
The text was updated successfully, but these errors were encountered:
use futures::future;// generate your vector of individual tasks by spawning them on green threads// but you need to clone "self" in order to apply on different threads, which will// shard the data-access pointer and cache pointers, etc to yield individual Directory<_>// instances on each threadlet tasks = proofs_to_generate.into_iter().map(|proof| {let self_clone = self.clone();
tokio::spawn(asyncmove{ self_clone.lookup(proof).await})}
let outputs = future::try_join_all(tasks).await?;
To improve the efficiency of bulk/multi lookups, we could call lookups async and await on the results of all lookups -- rather than awaiting on them individually.
The text was updated successfully, but these errors were encountered: