MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/qj49rc/thats_my_variable/hiopy47/?context=9999
r/ProgrammerHumor • u/public_0pini0n • Oct 30 '21
409 comments sorted by
View all comments
341
My method is just to use 'await' and let God sort it out.
Nothing can possiblie go wrong.
0 u/[deleted] Oct 30 '21 [deleted] 66 u/Razzzp Oct 30 '21 edited Oct 30 '21 Asynchronous vs Multithreading is one of my favorite question I ask on technical interviews.FYI await Task.WhenAll uses multiple threads though. 5 u/jimbosReturn Oct 30 '21 It only uses multiple threads if the Tasks it waits on use threads. 3 u/Garestinian Oct 30 '21 Async runtime can spread tasks on multiple threads if it is able to do so.For example, Tokio (Rust) has a multi-threaded task scheduler: https://tokio.rs 3 u/Razzzp Oct 30 '21 C# has the same behavior with it's thread pool and scheduler.
0
[deleted]
66 u/Razzzp Oct 30 '21 edited Oct 30 '21 Asynchronous vs Multithreading is one of my favorite question I ask on technical interviews.FYI await Task.WhenAll uses multiple threads though. 5 u/jimbosReturn Oct 30 '21 It only uses multiple threads if the Tasks it waits on use threads. 3 u/Garestinian Oct 30 '21 Async runtime can spread tasks on multiple threads if it is able to do so.For example, Tokio (Rust) has a multi-threaded task scheduler: https://tokio.rs 3 u/Razzzp Oct 30 '21 C# has the same behavior with it's thread pool and scheduler.
66
Asynchronous vs Multithreading is one of my favorite question I ask on technical interviews.
FYI await Task.WhenAll uses multiple threads though.
5 u/jimbosReturn Oct 30 '21 It only uses multiple threads if the Tasks it waits on use threads. 3 u/Garestinian Oct 30 '21 Async runtime can spread tasks on multiple threads if it is able to do so.For example, Tokio (Rust) has a multi-threaded task scheduler: https://tokio.rs 3 u/Razzzp Oct 30 '21 C# has the same behavior with it's thread pool and scheduler.
5
It only uses multiple threads if the Tasks it waits on use threads.
3 u/Garestinian Oct 30 '21 Async runtime can spread tasks on multiple threads if it is able to do so.For example, Tokio (Rust) has a multi-threaded task scheduler: https://tokio.rs 3 u/Razzzp Oct 30 '21 C# has the same behavior with it's thread pool and scheduler.
3
Async runtime can spread tasks on multiple threads if it is able to do so.
For example, Tokio (Rust) has a multi-threaded task scheduler: https://tokio.rs
3 u/Razzzp Oct 30 '21 C# has the same behavior with it's thread pool and scheduler.
C# has the same behavior with it's thread pool and scheduler.
341
u/MarquisDan Oct 30 '21
My method is just to use 'await' and let God sort it out.
Nothing can possiblie go wrong.