Created
April 13, 2017 05:20
-
-
Save randymarsh77/5cf9a0a699ac0c9ff983c32af359838f to your computer and use it in GitHub Desktop.
A trivial, useless example of async/await using Async
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
await (async { | |
print("Awaiting a task begins execution on the same thread.") | |
await (async { | |
print("So we can nest awaits without switching thread contexts.") | |
}) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment