What are the advantages to blocking code over non-blocking code?
问题 I'm learning about JavaScript and Node. I understand how asynchronous stuff works. I get why it could significantly speed things up. I see that other languages (like Ruby and Java?) are designed to be blocking. Why? I have a vague idea that you could use threads to handle situations where things take a long time. What are the advantages and disadvantages to this over doing things asynchronously? 回答1: Blocking, or synchronous code is easy to write, and the default single threaded behavior.