r/javascript • • Oct 29 '10

c# programmer: JavaScript is "completely single threaded and blocking" in relation to fetching from a URL.

/r/programming/comments/dxv7a/asynchrony_in_c_5_part_one/c13rj6k
0 Upvotes

26 comments sorted by

View all comments

-12

u/Not_Edward_Bernays Oct 29 '10

when I am waiting for a url to fetch, I can still interact with the browser.

so it is not really blocking. in the c# example, if he doesn't do all of his bullshit, then it really will block him and it will be obvious that it is.

9

u/[deleted] Oct 29 '10

It depends on how Archive(FetchUrl()) in the C# example works internally.

For example, it may spawn a thread and do all the work in that thread, and return immediately (ala, how DOM operations work in a browser). This doesn't take C# 5. You could do that with C# 1.0

I don't think you understood the article at all.