back

by danabramov·13y ago·view on hn ↗
No, you got it wrong. Await never blocks the UI thread.

Instead, the compiler rewrites your sequential code into a state machine. When you await on a task, the compiler turns this into scheduling a continuation. No blocking.

1 comments
Yep, I got it wrong. Thanks for pointing that.

Now I'm also wondering how I'd use something like that in an imperative language... Well, I have some studying to do.