Hey #rustlang people, anyone have time tomorrow to go over some complicated lifetimes+async/await code? I was exploring sccache and making its GCS cache (which is async/await) parallelizable, but I'm horribly stuck on how to properly type the cached credentials. 1/2
-
Show this thread
-
It's a struct that holds a shared future, should be peekable from multiple threads. Trying to see if it's possible to have async syntax rather than boxed, but the lifetimes are making it complicated to reason about. It would really help to have someone to bounce ideas off of. 2/2
2 replies 0 retweets 6 likesShow this thread -
Finally figured out a way to call it. This feels so wrong though: cached_credentails: Arc<RwLock<Option<Shared<Pin<Box<dyn Future<Output = Result<GCSCredential, Arc<failure::Error>> + Send + 'f>>>>>> I also had to convert a couple borrows into clones for my own sanity
4 replies 1 retweet 42 likesShow this thread
Replying to @Nashenas88
Async fn for traits can't come soon enough heh.
1:59 PM - 11 Aug 2019
from Berlin, Germany
0 replies
0 retweets
1 like
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.