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

4

u/drowsap Oct 29 '10

Can someone explain what is going on here? You can spawn timers and XMLHTTPRequests but the execution of their callback function will be single threaded. I don't get what is going on here? And I also thought it was true that you can have up to two simultaneous http requests to the same domain only?

6

u/BusStation16 Oct 29 '10
  1. That what makes this funny.

  2. You can have multiple (more than 2 even) simultaneous http requests to the same domain, JS however blocks while it is executing.