Created
July 30, 2018 16:50
-
-
Save erickt/748296103d3037b9b916956d4c9cc926 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct Foo { | |
things: Arc<Mutex<Thing>>, | |
} | |
impl Foo { | |
async fn foo(&self) { | |
let things = things.lock().unwrap(); | |
await!(self.bar()) | |
... | |
} | |
async fn bar(&self) { | |
let things = things.lock().unwrap(); | |
.... | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment