© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•10mo ago•
30 replies
LastExceed

consolidating my understanding of `async`/`await` in C# and Rust

Please confirm or correct the following:

1. A
Future
Future
represents a workload that has yet to be done
2. C# doesn't use
Future
Future
s (at least not remotely as ubiquitous as Rust)
3. "Spawning" (e.g. via
tokio::spawn(my_future)
tokio::spawn(my_future)
) begins (and ONLY begins) the execution of such a workload, and returns a
Task
Task
that represents the execution
4. Calling an async C# function which returns a
Task
Task
is analog to immediately spawning the future returned by an async Rust function
5. A
Task
Task
calling
await
await
on another
Task
Task
is analog (but NOT equivalent) to a
Thread
Thread
calling
.Join()
.Join()
on another
Thread
Thread
(except that the join handle of a C#
Thread
Thread
cannot convey a result, so the analogy fails for
Task<T>
Task<T>
)
6.
.ConfigureAwait(false)
.ConfigureAwait(false)
in C# is analog to using a multi-threaded runtime in Rust, and indicates that the workload may be executed not only concurrently, but also in parallel. This distinction is mostly relevant for context dependent workloads (e.g. some platforms restrict UI manipulation to the main thread), but also affects whether or not data races can occur
7. Exceptions thrown in async functions are automatically catched, stored in the returend
Task
Task
object, and rethrown on
await
await

8. calling an
async void
async void
method is like calling an
async Task
async Task
and discarding the returned
Task
Task
object, except that exceptions aren't catched, and can instead kill the entire thread
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Understanding intricacy of async/await (memory safety)
C#CC# / help
2w ago
✅ async/await and parallelism
C#CC# / help
13mo ago
async/await and mutexes
C#CC# / help
2y ago
✅ await in c#
C#CC# / help
2y ago